()
| 22 | } |
| 23 | |
| 24 | func (this *LoginedController) Prepare() { |
| 25 | this.BaseController.Prepare() |
| 26 | if models.NewAuth().GetByToken(this.Token).Uid == 0 { |
| 27 | this.Response(http.StatusUnauthorized, messageRequiredLogin) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func (this *LoginedController) Logout() { |
| 32 | models.NewAuth().DeleteByToken(this.Token) |
nothing calls this directly
no test coverage detected