PLT-6474: Server: Add elasticsearch/test endpoint to API. (#6792)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
a4f363a50b
Коммит
f2898927f1
24
app/elasticsearch.go
Обычный файл
24
app/elasticsearch.go
Обычный файл
@@ -0,0 +1,24 @@
|
||||
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
package app
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/mattermost/platform/model"
|
||||
"github.com/mattermost/platform/einterfaces"
|
||||
)
|
||||
|
||||
func TestElasticsearch() *model.AppError {
|
||||
if esI := einterfaces.GetElasticSearchInterface(); esI != nil {
|
||||
if err := esI.TestConfig(); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
err := model.NewAppError("TestElasticsearch", "ent.elasticsearch.test_config.license.error", nil, "", http.StatusNotImplemented)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Ссылка в новой задаче
Block a user