unified-push-xmpp/gateway/web_get.go

27 lines
395 B
Go
Raw Normal View History

2021-09-12 12:14:09 +02:00
package main
import (
"net/http"
"github.com/gin-gonic/gin"
2021-09-12 12:14:09 +02:00
"dev.sum7.eu/genofire/golang-lib/web"
)
type jsonDiscovery struct {
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,
},
})
})
}