mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
15 lines
273 B
Go
15 lines
273 B
Go
package api
|
|
|
|
import "net/http"
|
|
|
|
// GET /health
|
|
func (api *API) Health(w http.ResponseWriter, _ *http.Request) error {
|
|
if err := api.database.Health(); err != nil {
|
|
w.WriteHeader(http.StatusServiceUnavailable)
|
|
return err
|
|
}
|
|
|
|
w.WriteHeader(http.StatusOK)
|
|
return nil
|
|
}
|