2021-09-12 12:14:09 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2021-09-15 23:31:26 +02:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
2021-09-12 12:14:09 +02:00
|
|
|
"dev.sum7.eu/genofire/golang-lib/web"
|
|
|
|
)
|
|
|
|
|
|
|
|
type jsonDiscovery struct {
|
2021-09-15 23:31:26 +02:00
|
|
|
UnifiedPush jsonUP `json:"unifiedpush"`
|
2021-09-12 12:14:09 +02:00
|
|
|
}
|
|
|
|
type jsonUP struct {
|
|
|
|
Version int `json:"version"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func Get(r *gin.Engine, ws *web.Service) {
|
|
|
|
r.GET("/UP", func(c *gin.Context) {
|
|
|
|
c.JSON(http.StatusOK, jsonDiscovery{
|
|
|
|
jsonUP{
|
|
|
|
Version: 1,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|