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