cleanup and add a few stuff for http

This commit is contained in:
shoopea
2024-11-17 15:14:36 +01:00
parent 26c324c43c
commit e1806fd27a
14 changed files with 123 additions and 114 deletions

View File

@@ -74,9 +74,6 @@ func (a *AdminConfig) NewAdminUser() {
a.Users = append(a.Users, u)
log.WithFields(log.Fields{}).Warnf("Admin user password : %s", p)
return
}
func (a *AdminConfig) Run() {
@@ -121,10 +118,11 @@ func (a *AdminConfig) Run() {
protected := r.Group("p", HttpAuth())
protected.GET("test", HttpAnyHome)
protected.GET("home", HttpAnyHome)
unprotected := r.Group("u", HttpNoAuth())
unprotected.GET("signin", HttpAnySignIn)
unprotected.POST("signin", HttpAnySignIn)
unprotected.POST("signin", HttpPostSignIn)
unprotected.GET("recover", HttpGetRecover)
srv := &http.Server{
Addr: a.Addr,