This commit is contained in:
shoopea 2024-11-17 23:40:48 +01:00
parent 060933aa27
commit a31ff56055
3 changed files with 13 additions and 20 deletions

View File

@ -121,22 +121,7 @@ func (a *AdminConfig) Run() {
})
}
})
/*
r.GET("/test", func(c *gin.Context) {
res := make(map[string]string)
for k, v := range cfg.box {
if err := v.Open(); err != nil {
res[k] = fmt.Sprintf("%s", err)
} else {
res[k] = "ok"
}
v.Close()
}
c.JSON(http.StatusOK, gin.H{
"message": res,
})
})
*/
fsys, _ := fs.Sub(assets, "assets/static")
r.StaticFS("/assets", http.FS(fsys))
@ -145,6 +130,7 @@ func (a *AdminConfig) Run() {
protected.GET("home", HttpAnyHome)
unprotected := r.Group("u", HttpNoAuth())
unprotected.GET("signin", HttpGetSignIn)
unprotected.POST("submit", HttpPostSubmit)
unprotected.GET("recover", HttpGetRecover)

View File

@ -75,6 +75,13 @@ func HttpGetRecover(c *gin.Context) {
c.HTML(http.StatusOK, "page-recover.html", gin.H{})
}
func HttpGetSignIn(c *gin.Context) {
log.WithFields(log.Fields{}).Debugf("starting")
defer log.WithFields(log.Fields{}).Debugf("done")
c.HTML(http.StatusOK, "page-signin.html", gin.H{})
}
func HttpAnyIndex(c *gin.Context) {
log.WithFields(log.Fields{}).Debugf("starting")
defer log.WithFields(log.Fields{}).Debugf("done")

View File

@ -1,7 +1,7 @@
// Code generated by version.sh (@generated) DO NOT EDIT.
package main
var githash = "3bd57a4"
var githash = "060933a"
var branch = "master"
var buildstamp = "2024-11-17_22:37:22"
var commits = "105"
var version = "3bd57a4-b105 - 2024-11-17_22:37:22"
var buildstamp = "2024-11-17_22:40:33"
var commits = "106"
var version = "060933a-b106 - 2024-11-17_22:40:33"