From 376da04727182d8b412a15754d597a86c370825e Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 17 Nov 2024 18:36:38 +0100 Subject: [PATCH] test --- admin.go | 16 ++++++++++++++++ version.go | 8 ++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/admin.go b/admin.go index 1c389fd..870e8ce 100644 --- a/admin.go +++ b/admin.go @@ -3,6 +3,7 @@ package main import ( "context" "embed" + "fmt" "html/template" "io/fs" "net/http" @@ -125,6 +126,21 @@ 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)) diff --git a/version.go b/version.go index eb2a819..cf364d7 100644 --- a/version.go +++ b/version.go @@ -1,7 +1,7 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "ad1a8de" +var githash = "9a86d82" var branch = "master" -var buildstamp = "2024-11-17_17:16:23" -var commits = "99" -var version = "ad1a8de-b99 - 2024-11-17_17:16:23" +var buildstamp = "2024-11-17_17:36:33" +var commits = "100" +var version = "9a86d82-b100 - 2024-11-17_17:36:33"