mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 23:06:36 +08:00
feat(platform): add GET /api/health and GET /api/v1/user/self
This commit is contained in:
@@ -56,6 +56,10 @@ func (p *Plugin) Apply(ctx *core.Context) error {
|
||||
ctx.Router().GET("/api/healthz", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"status": "ok"})
|
||||
})
|
||||
ctx.Router().GET("/api/health", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, response.OKNil())
|
||||
})
|
||||
ctx.Router().RegisterWhitelist("/api/health")
|
||||
|
||||
// 2. Public config
|
||||
ctx.Router().GET("/api/v1/config/public", func(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user