feat: fix showing wrong error messages (#1385)

This commit is contained in:
Yaodong Yu
2022-12-09 15:11:13 +08:00
committed by GitHub
parent e705eecffe
commit b41d8652f0
11 changed files with 48 additions and 19 deletions

View File

@ -84,7 +84,7 @@ func (c *ApiController) SetTokenErrorHttpStatus() {
func (c *ApiController) RequireSignedIn() (string, bool) {
userId := c.GetSessionUsername()
if userId == "" {
c.ResponseError(c.T("util:Please login first"), "util:Please login first")
c.ResponseError(c.T("util:Please login first"), "Please login first")
return "", false
}
return userId, true