sun-pc-linux 5 months ago
parent
commit
065d5f46bd
1 changed files with 5 additions and 0 deletions
  1. 5 0
      scnict/src/api/move.go

+ 5 - 0
scnict/src/api/move.go

@@ -1,6 +1,7 @@
 package api
 
 import (
+	"errors"
 	"fmt"
 	"scnict/db/model"
 	"scnict/db/repo"
@@ -18,6 +19,10 @@ var old_url = "https://scnict.oss-cn-chengdu.aliyuncs.com/"
 var new_url = "https://oss.scnict.com/"
 
 func DbMove(c *gin.Context, apictx *ApiSession) (interface{}, error) {
+	key := c.Query("key")
+	if key != "dbmove" {
+		return nil, errors.New("key错误")
+	}
 	// banner
 	banners := []*model.NictBanner{}
 	repo.RepoDocsSearch(apictx.CreateRepoCtx(), &repo.PageSearchOptions{