fix
This commit is contained in:
parent
060933aa27
commit
a31ff56055
18
admin.go
18
admin.go
@ -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")
|
fsys, _ := fs.Sub(assets, "assets/static")
|
||||||
r.StaticFS("/assets", http.FS(fsys))
|
r.StaticFS("/assets", http.FS(fsys))
|
||||||
|
|
||||||
@ -145,6 +130,7 @@ func (a *AdminConfig) Run() {
|
|||||||
protected.GET("home", HttpAnyHome)
|
protected.GET("home", HttpAnyHome)
|
||||||
|
|
||||||
unprotected := r.Group("u", HttpNoAuth())
|
unprotected := r.Group("u", HttpNoAuth())
|
||||||
|
unprotected.GET("signin", HttpGetSignIn)
|
||||||
unprotected.POST("submit", HttpPostSubmit)
|
unprotected.POST("submit", HttpPostSubmit)
|
||||||
unprotected.GET("recover", HttpGetRecover)
|
unprotected.GET("recover", HttpGetRecover)
|
||||||
|
|
||||||
|
7
http.go
7
http.go
@ -75,6 +75,13 @@ func HttpGetRecover(c *gin.Context) {
|
|||||||
c.HTML(http.StatusOK, "page-recover.html", gin.H{})
|
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) {
|
func HttpAnyIndex(c *gin.Context) {
|
||||||
log.WithFields(log.Fields{}).Debugf("starting")
|
log.WithFields(log.Fields{}).Debugf("starting")
|
||||||
defer log.WithFields(log.Fields{}).Debugf("done")
|
defer log.WithFields(log.Fields{}).Debugf("done")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by version.sh (@generated) DO NOT EDIT.
|
// Code generated by version.sh (@generated) DO NOT EDIT.
|
||||||
package main
|
package main
|
||||||
var githash = "3bd57a4"
|
var githash = "060933a"
|
||||||
var branch = "master"
|
var branch = "master"
|
||||||
var buildstamp = "2024-11-17_22:37:22"
|
var buildstamp = "2024-11-17_22:40:33"
|
||||||
var commits = "105"
|
var commits = "106"
|
||||||
var version = "3bd57a4-b105 - 2024-11-17_22:37:22"
|
var version = "060933a-b106 - 2024-11-17_22:40:33"
|
||||||
|
Loading…
Reference in New Issue
Block a user