Refactor authentication handlers and middleware

This commit is contained in:
bronku 2025-03-28 20:33:34 +01:00
parent 024d63bb16
commit bba6e8618a
5 changed files with 67 additions and 38 deletions

17
internal/auth/get.go Normal file
View file

@ -0,0 +1,17 @@
package auth
import (
"fmt"
"net/http"
_ "embed"
)
//go:embed templates/login.html
var loginHTML string
func getLogin(w http.ResponseWriter, r *http.Request) {
w.Header().Set("content-type", "text/html")
fmt.Fprint(w, loginHTML)
return
}