Correctly handle errors from getSession

This commit is contained in:
2024-10-04 10:35:32 +02:00
parent 91d53a0f2a
commit c00645432b
6 changed files with 66 additions and 1 deletions

View File

@@ -15,6 +15,8 @@ import (
func UploadPDF(c *b.Config, s *b.CookieStore) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if _, err := getSession(w, r, c, s); err != nil {
log.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}