slash-e/server/system.go
2023-03-16 08:25:58 +08:00

24 lines
451 B
Go

package server
import (
"net/http"
"github.com/boojack/shortify/api"
"github.com/labstack/echo/v4"
)
func (s *Server) registerSystemRoutes(g *echo.Group) {
g.GET("/ping", func(c echo.Context) error {
return c.JSON(http.StatusOK, composeResponse(s.Profile))
})
g.GET("/status", func(c echo.Context) error {
systemStatus := api.SystemStatus{
Profile: s.Profile,
}
return c.JSON(http.StatusOK, composeResponse(systemStatus))
})
}