1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

refctor: change active users query

This commit is contained in:
Ferdinand Mütsch
2021-02-13 11:23:58 +01:00
parent 6b0b3bddda
commit daf67b844a
12 changed files with 430 additions and 358 deletions

View File

@ -57,7 +57,7 @@ func (m *AuthenticateMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Reques
if m.redirectTarget == "" {
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("401 unauthorized"))
w.Write([]byte(conf.ErrUnauthorized))
} else {
http.SetCookie(w, m.config.GetClearCookie(models.AuthCookieKey, "/"))
http.Redirect(w, r, m.redirectTarget, http.StatusFound)