everybody loves a refactor

This commit is contained in:
2026-02-15 12:27:36 +11:00
parent 2944443143
commit c5f6fe6098
44 changed files with 278 additions and 234 deletions

View File

@@ -12,6 +12,7 @@ import (
"git.haelnorr.com/h/oslstats/internal/db"
"git.haelnorr.com/h/oslstats/internal/discord"
"git.haelnorr.com/h/oslstats/internal/notify"
"git.haelnorr.com/h/oslstats/internal/respond"
"git.haelnorr.com/h/oslstats/internal/store"
"git.haelnorr.com/h/oslstats/internal/throw"
"git.haelnorr.com/h/oslstats/pkg/oauth"
@@ -34,10 +35,10 @@ func Login(
if r.Method == "POST" {
if err != nil {
notify.ServiceUnavailable(s, w, r, "Login currently unavailable", err)
w.WriteHeader(http.StatusOK)
respond.OK(w)
return
}
w.Header().Set("HX-Redirect", "/login")
respond.HXRedirect(w, "/login")
return
}