summaryrefslogtreecommitdiffstats
path: root/api/general.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-28 04:58:19 -0400
committerGeorge Goldberg <george@gberg.me>2017-03-28 09:58:19 +0100
commitdaca0d93f621bcb1daae149c178af0631bcd120a (patch)
tree6127936c76dbc6fd20a7377385469980e5bd72e3 /api/general.go
parentca8b8d1245026672b1a56d256bb8ff3c8bb1bba9 (diff)
downloadchat-daca0d93f621bcb1daae149c178af0631bcd120a.tar.gz
chat-daca0d93f621bcb1daae149c178af0631bcd120a.tar.bz2
chat-daca0d93f621bcb1daae149c178af0631bcd120a.zip
Move WebSocket API to it's own package and add websocket v4 endpoint (#5881)
Diffstat (limited to 'api/general.go')
-rw-r--r--api/general.go13
1 files changed, 0 insertions, 13 deletions
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
-}