0
0
mirror of https://github.com/vx3r/wg-gen-web.git synced 2025-09-11 12:24:27 +00:00

refactor, remove dirty migration, npm update

This commit is contained in:
vx3r
2020-04-19 14:13:44 +09:00
parent 9e4b22d0ef
commit a765dead02
12 changed files with 867 additions and 964 deletions

View File

@ -7,7 +7,7 @@ import (
"gitlab.127-0-0-1.fr/vx3r/wg-gen-web/core"
"gitlab.127-0-0-1.fr/vx3r/wg-gen-web/model"
"gitlab.127-0-0-1.fr/vx3r/wg-gen-web/template"
"gitlab.127-0-0-1.fr/vx3r/wg-gen-web/util"
"gitlab.127-0-0-1.fr/vx3r/wg-gen-web/version"
"net/http"
)
@ -30,7 +30,7 @@ func ApplyRoutes(r *gin.Engine) {
server.GET("", readServer)
server.PATCH("", updateServer)
server.GET("/config", configServer)
server.GET("/version", version)
server.GET("/version", versionStr)
}
}
@ -238,8 +238,8 @@ func configServer(c *gin.Context) {
c.Data(http.StatusOK, "application/config", configData)
}
func version(c *gin.Context) {
func versionStr(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"version": util.Version,
"version": version.Version,
})
}