MCPcopy Index your code
hub / github.com/TruthHun/BookStack / Prepare

Method Prepare

controllers/api/LoginedController.go:24–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24func (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
31func (this *LoginedController) Logout() {
32 models.NewAuth().DeleteByToken(this.Token)

Callers

nothing calls this directly

Calls 3

NewAuthFunction · 0.92
GetByTokenMethod · 0.80
ResponseMethod · 0.80

Tested by

no test coverage detected