git.sophuwu.com > goauth
tidy
sophuwu sophie@skisiel.com
Sun, 18 May 2025 18:52:43 +0200
commit

ae181af2163fb34f28f0f2b40f11e101f5079e22

parent

5abdbba5384c2d9f919552c16dcd0b3b100efbe3

2 files changed, 21 insertions(+), 21 deletions(-)

jump to
M go.modgo.mod

@@ -1,4 +1,4 @@

-module sophuwu.site/goauth +module git.sophuwu.com/goauth go 1.22.3
M http.gohttp.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" { +// +// } +// +// }