tidy
sophuwu sophie@skisiel.com
Sun, 18 May 2025 18:52:43 +0200
M
http.go
→
http.go
@@ -1,22 +1,22 @@
package goauth -import "net/http" - -func HttpGen(r *http.Request, w http.ResponseWriter) { - if r.Method == "POST" { - r.ParseForm() - user, qr, err := NewUser(r.Form.Get("username")) - if err != nil { - http.Error(w, "error: "+err.Error(), 500) - return - } - w.Header().Set("Content-Type", "text/html") - w.Write([]byte("<h1>Success!</h1>")) - w.Write([]byte("<p>QR Code:</p>")) - w.Write([]byte(qr.HTML())) - w.Write([]byte("<a href='/validate'>validate</a>")) - } else if r.Method == "GET" { - - } - -} +// import "net/http" +// +// func HttpGen(r *http.Request, w http.ResponseWriter) { +// if r.Method == "POST" { +// r.ParseForm() +// user, qr, err := NewUser(r.Form.Get("username")) +// if err != nil { +// http.Error(w, "error: "+err.Error(), 500) +// return +// } +// w.Header().Set("Content-Type", "text/html") +// w.Write([]byte("<h1>Success!</h1>")) +// w.Write([]byte("<p>QR Code:</p>")) +// w.Write([]byte(qr.HTML())) +// w.Write([]byte("<a href='/validate'>validate</a>")) +// } else if r.Method == "GET" { +// +// } +// +// }