[MM-56348] system/ping: add new method with options (#26079)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0aaa047ea3
Коммит
7d8a56019b
@@ -179,6 +179,7 @@ func getSystemPing(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
s[filestoreStatusKey] = model.StatusOk
|
||||
appErr := c.App.TestFileStoreConnection()
|
||||
if appErr != nil {
|
||||
c.Logger.Warn("Unable to test filestore connection.", mlog.Err(appErr))
|
||||
s[filestoreStatusKey] = model.StatusUnhealthy
|
||||
s[model.STATUS] = model.StatusUnhealthy
|
||||
}
|
||||
@@ -194,7 +195,7 @@ func getSystemPing(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
s["ActiveSearchBackend"] = c.App.ActiveSearchBackend()
|
||||
|
||||
if s[model.STATUS] != model.StatusOk {
|
||||
if s[model.STATUS] != model.StatusOk && r.FormValue("use_rest_semantics") != "true" {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
}
|
||||
w.Write([]byte(model.MapToJSON(s)))
|
||||
|
||||
Ссылка в новой задаче
Block a user