add api: /api/n9e/version

This commit is contained in:
UlricQin 2021-12-01 16:46:37 +08:00
parent f63f019e87
commit dd8e1f2d71
1 changed files with 4 additions and 0 deletions

View File

@ -102,6 +102,10 @@ func configRoute(r *gin.Engine, version string) {
{ {
pages.Any("/prometheus/*url", jwtAuth(), prometheusProxy) pages.Any("/prometheus/*url", jwtAuth(), prometheusProxy)
pages.GET("/version", func(c *gin.Context) {
c.String(200, version)
})
pages.POST("/auth/login", loginPost) pages.POST("/auth/login", loginPost)
pages.POST("/auth/logout", logoutPost) pages.POST("/auth/logout", logoutPost)
pages.POST("/auth/refresh", refreshPost) pages.POST("/auth/refresh", refreshPost)