Other Packages: NewLocAppError -> NewAppError (#7283)

This commit is contained in:
George Goldberg
2017-08-25 18:04:37 +08:00
committed by Saturnino Abril
parent f6e0310b50
commit 1a2a02440c
5 changed files with 25 additions and 21 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import (
"github.com/mattermost/platform/app"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
"net/http"
)
func ApiWebSocketHandler(wh func(*model.WebSocketRequest) (map[string]interface{}, *model.AppError)) webSocketHandler {
@@ -54,5 +55,5 @@ func (wh webSocketHandler) ServeWebSocket(conn *app.WebConn, r *model.WebSocketR
}
func NewInvalidWebSocketParamError(action string, name string) *model.AppError {
return model.NewLocAppError("/api/v3/users/websocket:"+action, "api.websocket_handler.invalid_param.app_error", map[string]interface{}{"Name": name}, "")
return model.NewAppError("/api/v3/users/websocket:"+action, "api.websocket_handler.invalid_param.app_error", map[string]interface{}{"Name": name}, "", http.StatusBadRequest)
}