Cleaned up middleware/route handlers

This commit is contained in:
2025-02-22 20:34:09 +11:00
parent 0a3796914f
commit f34c1c11aa
18 changed files with 58 additions and 96 deletions

View File

@@ -10,7 +10,7 @@ import (
"projectreshoot/contexts"
"projectreshoot/cookies"
"projectreshoot/db"
"projectreshoot/handlers"
"projectreshoot/handler"
"projectreshoot/jwt"
"github.com/pkg/errors"
@@ -119,7 +119,7 @@ func Authentication(
// Failed to start transaction, skip auth
logger.Warn().Err(err).
Msg("Skipping Auth - unable to start a transaction")
handlers.ErrorPage(http.StatusServiceUnavailable, w, r)
handler.ErrorPage(http.StatusServiceUnavailable, w, r)
return
}
user, err := getAuthenticatedUser(config, ctx, tx, w, r)