Skip to content

Commit

Permalink
Add get version function
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Jul 20, 2023
1 parent d8dd815 commit 89a0ea3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions route/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/IceWhaleTech/CasaOS-Common/external"
"github.com/IceWhaleTech/CasaOS-Common/middleware"
"github.com/IceWhaleTech/CasaOS-Common/utils/jwt"
"github.com/IceWhaleTech/CasaOS/common"
"github.com/IceWhaleTech/CasaOS/pkg/config"
v1 "github.com/IceWhaleTech/CasaOS/route/v1"

Expand Down Expand Up @@ -35,6 +36,9 @@ func InitV1Router() *gin.Engine {
r.GET("/v1/sys/debug", v1.GetSystemConfigDebug) // //debug

r.GET("/v1/sys/version/check", v1.GetSystemCheckVersion)
r.GET("/v1/sys/version/current", func(ctx *gin.Context) {
ctx.String(200, common.VERSION)
})
r.GET("/ping", func(ctx *gin.Context) {
ctx.String(200, "pong")
})
Expand Down

0 comments on commit 89a0ea3

Please sign in to comment.