修改前端内容
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"lmvpn/internal/version"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type versionResponse struct {
|
||||
Version string `json:"version"`
|
||||
Commit string `json:"commit"`
|
||||
CommitTime string `json:"commit_time"`
|
||||
BuildTime string `json:"build_time"`
|
||||
}
|
||||
|
||||
func GetVersion(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, versionResponse{
|
||||
Version: version.Version,
|
||||
Commit: version.Commit,
|
||||
CommitTime: version.CommitTime,
|
||||
BuildTime: version.BuildTime,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user