fix: Add error handling to session store

This commit is contained in:
Danny Bessems 2024-03-10 22:48:34 +11:00
parent 98ea369664
commit 1af505196a

View File

@ -52,7 +52,12 @@ func callbackHandler(w http.ResponseWriter, r *http.Request) {
}
// Store the token in the session
session, _ := sessionStore.Get(r, "spamasaurusRex")
session, err := sessionStore.Get(r, "spamasaurusRex")
if err != nil {
log.Println(spew.Sdump(err))
return
}
session.Values["token"] = token
session.Save(r, w)