session validation/invalidation

This commit is contained in:
ari melody 2025-04-29 16:31:39 +01:00
parent 1c0e541c89
commit 562ed2e015
Signed by: ari
GPG key ID: 60B5F0386E3DDB7E
4 changed files with 19 additions and 6 deletions

View file

@ -20,7 +20,7 @@ func ServeRelease(app *model.AppState, release *model.Release) http.Handler {
// only allow authorised users to view hidden releases
privileged := false
if !release.Visible {
session, err := controller.GetSessionFromRequest(app.DB, r)
session, err := controller.GetSessionFromRequest(app, r)
if err != nil {
fmt.Fprintf(os.Stderr, "WARN: Failed to retrieve session: %v\n", err)
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)