mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
refactor: SessionUser -> SessionUsername
Signed-off-by: Kininaru <shiftregister233@outlook.com>
This commit is contained in:
@ -60,7 +60,7 @@ func (c *ApiController) ResponseErrorWithData(error string, data interface{}) {
|
||||
}
|
||||
|
||||
func (c *ApiController) RequireSignedIn() (string, bool) {
|
||||
userId := c.GetSessionUser()
|
||||
userId := c.GetSessionUsername()
|
||||
if userId == "" {
|
||||
resp := Response{Status: "error", Msg: "Please sign in first"}
|
||||
c.Data["json"] = resp
|
||||
|
Reference in New Issue
Block a user