mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat: change version API to generated version
This commit is contained in:
parent
de420ab6ff
commit
f9802e6b2b
4 changed files with 30 additions and 30 deletions
|
@ -1,14 +1,16 @@
|
|||
package system
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/0xJacky/Nginx-UI/api"
|
||||
"github.com/0xJacky/Nginx-UI/internal/upgrader"
|
||||
"github.com/0xJacky/Nginx-UI/internal/version"
|
||||
"github.com/0xJacky/Nginx-UI/settings"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/uozi-tech/cosy/logger"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func GetRelease(c *gin.Context) {
|
||||
|
@ -32,13 +34,7 @@ func GetRelease(c *gin.Context) {
|
|||
}
|
||||
|
||||
func GetCurrentVersion(c *gin.Context) {
|
||||
curVer, err := upgrader.GetCurrentVersion()
|
||||
if err != nil {
|
||||
api.ErrHandler(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, curVer)
|
||||
c.JSON(http.StatusOK, version.GetVersionInfo())
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue