mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: fix showing wrong error message: "Please sign in first" (#1245)
This commit is contained in:
@ -83,7 +83,7 @@ func (c *ApiController) SetTokenErrorHttpStatus() {
|
||||
func (c *ApiController) RequireSignedIn() (string, bool) {
|
||||
userId := c.GetSessionUsername()
|
||||
if userId == "" {
|
||||
c.ResponseError(c.T("LoginErr.SignInFirst"))
|
||||
c.ResponseError(c.T("LoginErr.LoginFirst"), "Please login first")
|
||||
return "", false
|
||||
}
|
||||
return userId, true
|
||||
|
Reference in New Issue
Block a user