diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2017-06-10 19:21:54 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2017-06-10 19:21:54 -0400 |
| commit | 246ce98dc8a7a55c6a9dfb850afcc69c7c8ea4f8 (patch) | |
| tree | aff48491487d8cf58e2f955f403d616a9aa7bcaf /web.go | |
| parent | 3d28f3c83dabe6049d8d189c29483ed8afcd6641 (diff) | |
| download | lastfm-api-246ce98dc8a7a55c6a9dfb850afcc69c7c8ea4f8.tar.gz | |
do not ignore error
Diffstat (limited to 'web.go')
| -rw-r--r-- | web.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -26,7 +26,9 @@ type UserSession struct { func (app *App) login(w http.ResponseWriter, r *http.Request) { state := hex.EncodeToString(genKey(32)) - app.SetCookie(w, "state", state, 120) + if err := app.SetCookie(w, "state", state, 120); err != nil { + log.Panic(err) + } url := app.Config.OAuth.AuthCodeURL(state) app.Template.ExecuteTemplate(w, "login.tmpl", url) } |
