|
@@ -151,7 +151,7 @@ func (c *auth) Login(ctx *gin.Context) {
|
|
|
ctx.JSON(http.StatusOK, common.SuccessResponse(common.Success, rsp))
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func checkLock() {
|
|
|
|
|
|
}
|
|
@@ -205,6 +205,9 @@ func captchaGrant(token model.Token, ctx *gin.Context) (*model.UserInfo, *common
|
|
|
|
|
|
|
|
|
info.User = service.UserService.GetOne(token.TenantId, token.UserName, token.Password)
|
|
|
+ if info.User == nil {
|
|
|
+ return nil, common.ParamsInvalidResponse(model.UserNotFound, nil)
|
|
|
+ }
|
|
|
info.TenantId = token.TenantId
|
|
|
info.Roles = []string{"admin"}
|
|
|
if info.User != nil {
|