Move WebSocket API to it's own package and add websocket v4 endpoint (#5881)

This commit is contained in:
Joram Wilander
2017-03-28 04:58:19 -04:00
committed by George Goldberg
parent ca8b8d1245
commit daca0d93f6
22 changed files with 370 additions and 96 deletions

View File

@@ -92,7 +92,6 @@ var BaseRoutes *Routes
func InitRouter() {
app.Srv.Router = mux.NewRouter()
app.Srv.Router.NotFoundHandler = http.HandlerFunc(Handle404)
app.Srv.WebSocketRouter = app.NewWebSocketRouter()
}
func InitApi(full bool) {
@@ -174,6 +173,7 @@ func InitApi(full bool) {
InitBrand()
InitCommand()
InitStatus()
InitWebSocket()
app.Srv.Router.Handle("/api/v4/{anything:.*}", http.HandlerFunc(Handle404))