From a31ff56055fd3bef0d96fa260d41cfff8cd69627 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 17 Nov 2024 23:40:48 +0100 Subject: [PATCH] fix --- admin.go | 18 ++---------------- http.go | 7 +++++++ version.go | 8 ++++---- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/admin.go b/admin.go index fcdf8af..baba858 100644 --- a/admin.go +++ b/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) diff --git a/http.go b/http.go index 1e31711..57c306f 100644 --- a/http.go +++ b/http.go @@ -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") diff --git a/version.go b/version.go index acb4f2c..c7420c7 100644 --- a/version.go +++ b/version.go @@ -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"