GetSelfUserInfo: Handle the case where the user does not exist

This commit is contained in:
skiffer-git 2022-08-18 10:50:09 +08:00
parent 4614107b2b
commit 30b55ce25e

View File

@ -366,11 +366,10 @@ func GetSelfUserInfo(c *gin.Context) {
log.NewInfo(req.OperationID, "GetUserInfo api return ", resp)
c.JSON(http.StatusOK, resp)
} else {
resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}}
resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}
log.NewInfo(req.OperationID, "GetUserInfo api return ", resp)
c.JSON(http.StatusOK, resp)
}
}
// @Summary 获取用户在线状态