From 48b785aded359c98cf0008bd652a4437ea807cbd Mon Sep 17 00:00:00 2001 From: Robin Naundorf Date: Fri, 17 Feb 2017 11:57:19 +0100 Subject: Add APIv4 /system/ping endpoint (#5443) --- api4/system.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 api4/system.go (limited to 'api4/system.go') diff --git a/api4/system.go b/api4/system.go new file mode 100644 index 000000000..94f4718a2 --- /dev/null +++ b/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) +} -- cgit v1.2.3-1-g7c22