sneak/integrate-di (#17)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
moving this to use uber/fx di framework instead of the ad hoc di setup before Co-authored-by: sneak <sneak@sneak.berlin> Reviewed-on: #17
This commit was merged in pull request #17.
This commit is contained in:
19
internal/handlers/login.go
Normal file
19
internal/handlers/login.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"git.eeqj.de/sneak/gohttpserver/templates"
|
||||
)
|
||||
|
||||
func (s *Handlers) HandleLoginGET() http.HandlerFunc {
|
||||
t := templates.GetParsed()
|
||||
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
err := t.ExecuteTemplate(w, "login.html", nil)
|
||||
if err != nil {
|
||||
s.log.Error().Err(err).Msg("")
|
||||
http.Error(w, http.StatusText(500), 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user