From 22d62efbc8650c3042ccd7f622291fb448553a8b Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Wed, 7 Nov 2018 13:42:34 +0800 Subject: [PATCH] Renamed /ping to /health for healthcheck endpoint. --- bridge/api/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge/api/api.go b/bridge/api/api.go index 539f9240..e7d33f06 100644 --- a/bridge/api/api.go +++ b/bridge/api/api.go @@ -39,7 +39,7 @@ func New(cfg *bridge.Config) bridge.Bridger { return key == b.GetString("Token"), nil })) } - e.GET("/api/ping", b.handlePing) + e.GET("/api/health", b.handleHealthcheck) e.GET("/api/messages", b.handleMessages) e.GET("/api/stream", b.handleStream) e.POST("/api/message", b.handlePostMessage) @@ -76,8 +76,8 @@ func (b *Api) Send(msg config.Message) (string, error) { return "", nil } -func (b *Api) handlePing(c echo.Context) error { - return c.String(http.StatusOK, "pong") +func (b *Api) handleHealthcheck(c echo.Context) error { + return c.String(http.StatusOK, "OK") } func (b *Api) handlePostMessage(c echo.Context) error {