test
This commit is contained in:
parent
9a86d82460
commit
376da04727
16
admin.go
16
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))
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user