everybody loves a refactor
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user