fix
This commit is contained in:
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")
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user