diff options
Diffstat (limited to 'api/general.go')
-rw-r--r-- | api/general.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/api/general.go b/api/general.go index fdf884d6b..4124d2e95 100644 --- a/api/general.go +++ b/api/general.go @@ -21,6 +21,7 @@ func InitGeneral() { BaseRoutes.General.Handle("/log_client", ApiAppHandler(logClient)).Methods("POST") BaseRoutes.General.Handle("/ping", ApiAppHandler(ping)).Methods("GET") + BaseRoutes.WebSocket.Handle("ping", ApiWebSocketHandler(webSocketPing)) } func getClientConfig(c *Context, w http.ResponseWriter, r *http.Request) { @@ -71,3 +72,8 @@ func ping(c *Context, w http.ResponseWriter, r *http.Request) { m["node_id"] = "" w.Write([]byte(model.MapToJson(m))) } + +func webSocketPing(req *model.WebSocketRequest, responseData map[string]interface{}) *model.AppError { + responseData["text"] = "pong" + return nil +} |