oc-auth/controllers/version.go

35 lines
616 B
Go
Raw Normal View History

2024-07-26 13:46:05 +02:00
package controllers
import (
beego "github.com/beego/beego/v2/server/web"
)
// VersionController operations for Version
type VersionController struct {
beego.Controller
}
// @Title GetAll
// @Description get version
// @Success 200
// @router / [get]
func (c *VersionController) GetAll() {
2025-04-01 10:16:26 +02:00
c.Data["json"] = map[string]string{
"service": "oc-auth",
"version": "1",
}
2024-07-26 13:46:05 +02:00
c.ServeJSON()
}
// @Title Get
// @Description get version
// @Success 200
// @router /discovery [get]
func (c *VersionController) Get() {
2025-04-01 10:16:26 +02:00
c.Data["json"] = map[string]string{
"service": "oc-auth",
"version": "1",
}
c.ServeJSON()
}