1 parent
096b4b8fed
commit
cc4aa851bc
43 files changed
+256
-396
No files matched your search
@@ -37,6 +37,10 @@ func GetUserGroup(ctx *context.Context, w http.ResponseWriter, req *http.Request
|
||||
Label: i18n.GetText(ctx.Lang, "sketch"),
|
||||
Tag: dto.SearchTag{Type: 1, Status: 0}.ToString(),
|
||||
},
|
||||
{
|
||||
Label: i18n.GetText(ctx.Lang, "deleted"),
|
||||
Tag: dto.SearchTag{Type: -1, Status: 3}.ToString(),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -35,9 +35,8 @@ func Login(ctx *context.Context, w http.ResponseWriter, req *http.Request) {
|
||||
var user models.User
|
||||
|
||||
encodePwd := password.Encode(reqData.Password)
|
||||
|
||||
err = db.Instance.Get(&user, db.WithContext(ctx, "select * from user where account =? and password =?"),
|
||||
reqData.Account, encodePwd)
|
||||
|
||||
_, err = db.Instance.Where("account =? and password =?", reqData.Account, encodePwd).Get(&user)
|
||||
if err != nil && err != sql.ErrNoRows {
|
||||
log.Errorf("%+v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user