Commit 32d0cb2c by chenxianqi

fix admin logout online == 0

parent 2c768637
Showing with 1 additions and 0 deletions
...@@ -86,6 +86,7 @@ func (c *AuthController) Logout() { ...@@ -86,6 +86,7 @@ func (c *AuthController) Logout() {
_ = o.Read(&admin, "Token") _ = o.Read(&admin, "Token")
admin.Token = "" admin.Token = ""
admin.CurrentConUser = 0 admin.CurrentConUser = 0
admin.Online = 0
if _, err := o.Update(&admin); err != nil { if _, err := o.Update(&admin); err != nil {
logs.Error(err) logs.Error(err)
c.Data["json"] = utils.ResponseError(c.Ctx, "退出失败!", nil) c.Data["json"] = utils.ResponseError(c.Ctx, "退出失败!", nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment