test
This commit is contained in:
parent
9a86d82460
commit
376da04727
16
admin.go
16
admin.go
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"embed"
|
"embed"
|
||||||
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"net/http"
|
"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")
|
fsys, _ := fs.Sub(assets, "assets/static")
|
||||||
r.StaticFS("/assets", http.FS(fsys))
|
r.StaticFS("/assets", http.FS(fsys))
|
||||||
|
|
||||||
|
@ -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 = "ad1a8de"
|
var githash = "9a86d82"
|
||||||
var branch = "master"
|
var branch = "master"
|
||||||
var buildstamp = "2024-11-17_17:16:23"
|
var buildstamp = "2024-11-17_17:36:33"
|
||||||
var commits = "99"
|
var commits = "100"
|
||||||
var version = "ad1a8de-b99 - 2024-11-17_17:16:23"
|
var version = "9a86d82-b100 - 2024-11-17_17:36:33"
|
||||||
|
Loading…
Reference in New Issue
Block a user