浏览代码

log remove

lijian 1 年之前
父节点
当前提交
a8278606a0
共有 2 个文件被更改,包括 5 次插入6 次删除
  1. 2 3
      services/apiprovider/actions.go
  2. 3 3
      services/registry/registry.go

+ 2 - 3
services/apiprovider/actions.go

@@ -4,7 +4,6 @@ import (
 	"context"
 	"encoding/json"
 	"errors"
-	"fmt"
 	"github.com/gogf/gf/encoding/gjson"
 	"sparrow/pkg/productconfig"
 	"sparrow/pkg/rpcs"
@@ -356,14 +355,14 @@ func AppAuth(req *http.Request, r render.Render) {
 	}
 
 	app := &models.Application{}
-	fmt.Println("+++++++++++++++++++++++++")
+
 	err = server.RPCCallByName(nil, rpcs.RegistryServerName, "Registry.FindApplicationByAppKey", ruleReq, app)
 	if err != nil {
 
 		r.JSON(http.StatusOK, renderError(ErrWrongSecret, errors.New("invalid secret key")))
 		return
 	}
-	fmt.Println("---------")
+
 	if app.SecretKey != ruleReq.Secretkey {
 		// device secret is wrong.
 		r.JSON(http.StatusOK, renderError(ErrWrongSecret, errors.New("wrong application secret")))

+ 3 - 3
services/registry/registry.go

@@ -276,18 +276,18 @@ func (r *Registry) FindApplication(id string, reply *models.Application) error {
 
 // FindApplicationByAppKey AppAuth will find the application with given args
 func (r *Registry) FindApplicationByAppKey(args *rpcs.ArgsAppAuth, reply *models.Application) error {
-	fmt.Println("1")
+
 	db, err := getDB()
 	if err != nil {
 		return err
 	}
-	fmt.Println("2")
+
 	a := &models.Application{}
 	a.AppKey = args.AppKey
 	a.SecretKey = args.Secretkey
 
 	err = db.Where(a).First(&reply).Error
-	fmt.Println("3")
+
 	if err != nil {
 		return err
 	}