added build nr to about endpoint

This commit is contained in:
Bernhard B
2020-04-10 20:38:38 +02:00
parent 7ef4038ed3
commit d1b8c6b770

View File

@@ -212,9 +212,10 @@ func main() {
router.GET("/v1/about", func(c *gin.Context) { router.GET("/v1/about", func(c *gin.Context) {
type About struct { type About struct {
SupportedApiVersions []string `json:"versions"` SupportedApiVersions []string `json:"versions"`
BuildNr int `json:"build"`
} }
about := About{SupportedApiVersions: []string{"v1", "v2"}} about := About{SupportedApiVersions: []string{"v1", "v2"}, BuildNr: 2}
c.JSON(200, about) c.JSON(200, about)
}) })