server/admin/api/version.go

16 lines
242 B
Go
Raw Normal View History

package api
import (
2022-05-16 09:38:46 +00:00
"net/http"
"github.com/gin-gonic/gin"
)
2022-05-16 09:38:46 +00:00
func DeclareVersionRoutes(router *gin.RouterGroup) {
router.GET("/version", showVersion)
}
2022-05-16 09:38:46 +00:00
func showVersion(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"version": 1.0})
}