From daca0d93f621bcb1daae149c178af0631bcd120a Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 28 Mar 2017 04:58:19 -0400 Subject: Move WebSocket API to it's own package and add websocket v4 endpoint (#5881) --- api/general.go | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'api/general.go') diff --git a/api/general.go b/api/general.go index 5c8e45082..e273268a4 100644 --- a/api/general.go +++ b/api/general.go @@ -10,7 +10,6 @@ import ( l4g "github.com/alecthomas/log4go" - "github.com/mattermost/platform/app" "github.com/mattermost/platform/model" "github.com/mattermost/platform/utils" ) @@ -21,8 +20,6 @@ func InitGeneral() { BaseRoutes.General.Handle("/client_props", ApiAppHandler(getClientConfig)).Methods("GET") BaseRoutes.General.Handle("/log_client", ApiAppHandler(logClient)).Methods("POST") BaseRoutes.General.Handle("/ping", ApiAppHandler(ping)).Methods("GET") - - app.Srv.WebSocketRouter.Handle("ping", ApiWebSocketHandler(webSocketPing)) } func getClientConfig(c *Context, w http.ResponseWriter, r *http.Request) { @@ -72,13 +69,3 @@ func ping(c *Context, w http.ResponseWriter, r *http.Request) { m["server_time"] = fmt.Sprintf("%v", model.GetMillis()) w.Write([]byte(model.MapToJson(m))) } - -func webSocketPing(req *model.WebSocketRequest) (map[string]interface{}, *model.AppError) { - data := map[string]interface{}{} - data["text"] = "pong" - data["version"] = model.CurrentVersion - data["server_time"] = model.GetMillis() - data["node_id"] = "" - - return data, nil -} -- cgit v1.2.3-1-g7c22