mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-19 13:36:20 +00:00
24 lines
451 B
Go
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))
|
|
})
|
|
}
|