We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f942a4 commit 6c6ca40Copy full SHA for 6c6ca40
example/server/server.go
@@ -143,7 +143,13 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {
143
}
144
145
if r.Method == "POST" {
146
- store.Set("LoggedInUserID", "000000")
+ if r.Form == nil {
147
+ if err := r.ParseForm(); err != nil {
148
+ http.Error(w, err.Error(), http.StatusInternalServerError)
149
+ return
150
+ }
151
152
+ store.Set("LoggedInUserID", r.Form.Get("username"))
153
store.Save()
154
155
w.Header().Set("Location", "/auth")
0 commit comments