Add APIv4 /system/ping endpoint (#5443)

Этот коммит содержится в:
Robin Naundorf
2017-02-17 11:57:19 +01:00
коммит произвёл George Goldberg
родитель eadf37ad7a
Коммит 48b785aded
4 изменённых файлов: 53 добавлений и 0 удалений

21
api4/system.go Обычный файл
Просмотреть файл

@@ -0,0 +1,21 @@
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package api4
import (
"net/http"
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/utils"
)
func InitSystem() {
l4g.Debug(utils.T("api.system.init.debug"))
BaseRoutes.System.Handle("/ping", ApiHandler(getSystemPing)).Methods("GET")
}
func getSystemPing(c *Context, w http.ResponseWriter, r *http.Request) {
ReturnStatusOK(w)
}