Mono repo -> Master (#22553)
Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
Этот коммит содержится в:
22
server/channels/wsapi/system.go
Обычный файл
22
server/channels/wsapi/system.go
Обычный файл
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package wsapi
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
)
|
||||
|
||||
func (api *API) InitSystem() {
|
||||
api.Router.Handle("ping", api.APIWebSocketHandler(ping))
|
||||
}
|
||||
|
||||
func ping(req *model.WebSocketRequest) (map[string]any, *model.AppError) {
|
||||
data := map[string]any{}
|
||||
data["text"] = "pong"
|
||||
data["version"] = model.CurrentVersion
|
||||
data["server_time"] = model.GetMillis()
|
||||
data["node_id"] = ""
|
||||
|
||||
return data, nil
|
||||
}
|
||||
Ссылка в новой задаче
Block a user