mirror of
https://github.com/datarhei/core.git
synced 2025-10-04 15:42:57 +08:00
WIP: introducing cluster versioning, degraded mode
This commit is contained in:
@@ -95,6 +95,14 @@ func NewAPI(config APIConfig) (API, error) {
|
||||
doc := a.router.Group("/v1/swagger/*")
|
||||
doc.GET("", echoSwagger.EchoWrapHandler(echoSwagger.InstanceName("ClusterAPI")))
|
||||
|
||||
a.router.GET("/", func(c echo.Context) error {
|
||||
return c.JSON(http.StatusOK, Version.String())
|
||||
})
|
||||
|
||||
a.router.GET("/v1/about", func(c echo.Context) error {
|
||||
return c.JSON(http.StatusOK, Version.String())
|
||||
})
|
||||
|
||||
a.router.POST("/v1/server", a.AddServer)
|
||||
a.router.DELETE("/v1/server/:id", a.RemoveServer)
|
||||
|
||||
|
Reference in New Issue
Block a user