Commit 8586ebf0 authored by Steven's avatar Steven

chore: add `/healthz` endpoint

parent 472afce9
...@@ -99,6 +99,12 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store ...@@ -99,6 +99,12 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
} }
s.Secret = secret s.Secret = secret
// Register healthz endpoint.
e.GET("/healthz", func(c echo.Context) error {
return c.String(http.StatusOK, "OK!\n")
})
// Register API v1 endpoints.
rootGroup := e.Group("") rootGroup := e.Group("")
apiV1Service := apiv1.NewAPIV1Service(s.Secret, profile, store, s.telegramBot) apiV1Service := apiv1.NewAPIV1Service(s.Secret, profile, store, s.telegramBot)
apiV1Service.Register(rootGroup) apiV1Service.Register(rootGroup)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment