You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-12-21 23:57:41 +02:00
checkpoint
This commit is contained in:
@@ -28,10 +28,10 @@ func (c *Check) Health(ctx context.Context, w http.ResponseWriter, r *http.Reque
|
||||
}
|
||||
|
||||
// check redis
|
||||
//err = c.Redis.Ping().Err()
|
||||
//if err != nil {
|
||||
// return errors.Wrap(err, "Redis failed")
|
||||
//}
|
||||
err = c.Redis.Ping().Err()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Redis failed")
|
||||
}
|
||||
|
||||
status := struct {
|
||||
Status string `json:"status"`
|
||||
@@ -41,3 +41,11 @@ func (c *Check) Health(ctx context.Context, w http.ResponseWriter, r *http.Reque
|
||||
|
||||
return web.RespondJson(ctx, w, status, http.StatusOK)
|
||||
}
|
||||
|
||||
// Ping validates the service is ready to accept requests.
|
||||
func (c *Check) Ping(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
|
||||
status := "pong"
|
||||
|
||||
return web.RespondJson(ctx, w, status, http.StatusOK)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user