by Robin at 20240327; alter down
This commit is contained in:
parent
d96a03b02c
commit
3cc6f0a322
|
@ -75,23 +75,21 @@ func ApiUpdatePassword(ctx *gin.Context) {
|
|||
|
||||
func ApiLoginByVeriCode(ctx *gin.Context) {
|
||||
req := ctx.MustGet("client_req").(*loginproto.ApiLoginByVeriCodeReq)
|
||||
//isEnabled, token, accountVO, ec := service.DefaultService.ApiLoginByVeriCode(ctx, req)
|
||||
ec := errcode.ErrCodeSuspend
|
||||
isEnabled, token, accountVO, ec := service.DefaultService.ApiLoginByVeriCode(ctx, req)
|
||||
if ec != errcode.ErrCodeLoginSrvOk {
|
||||
logger.Error("ApiLoginByVeriCode fail, req: %v, ec: %v", util.ToJson(req), ec)
|
||||
ReplyErrCodeMsg(ctx, ec)
|
||||
return
|
||||
}
|
||||
|
||||
//填充媒体切片
|
||||
// mediafiller.FillEntity(ctx, accountVO.Avatar)
|
||||
|
||||
// ReplyOk(ctx, &loginproto.ApiLoginData{
|
||||
// IsEnabled: isEnabled,
|
||||
// Token: token,
|
||||
// AccountVO: accountVO,
|
||||
// })
|
||||
// 填充媒体切片
|
||||
mediafiller.FillEntity(ctx, accountVO.Avatar)
|
||||
|
||||
ReplyOk(ctx, &loginproto.ApiLoginData{
|
||||
IsEnabled: isEnabled,
|
||||
Token: token,
|
||||
AccountVO: accountVO,
|
||||
})
|
||||
}
|
||||
|
||||
func ApiLogout(ctx *gin.Context) {
|
||||
|
|
|
@ -76,12 +76,6 @@ func (s *Service) ApiLoginByPswd(ctx *gin.Context, req *loginproto.ApiLoginByPsw
|
|||
return
|
||||
}
|
||||
|
||||
// 20240326整改临时调整
|
||||
if util.DerefInt64(account.Role) != consts.Admin && util.DerefInt64(account.Role) != consts.Supportor {
|
||||
ec = errcode.ErrCodeSuspend
|
||||
return
|
||||
}
|
||||
|
||||
// 2.让已登录的用户强制下线
|
||||
if util.DerefInt64(login.IsLogined) == 1 {
|
||||
if _, ec = s.ApiLogout(ctx, &loginproto.ApiLogoutReq{
|
||||
|
|
Loading…
Reference in New Issue