diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/elasticsearch.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/elasticsearch.go b/app/elasticsearch.go index ef34a6074..857ed570a 100644 --- a/app/elasticsearch.go +++ b/app/elasticsearch.go @@ -31,3 +31,16 @@ func TestElasticsearch(cfg *model.Config) *model.AppError { return nil } + +func PurgeElasticsearchIndexes() *model.AppError { + if esI := einterfaces.GetElasticsearchInterface(); esI != nil { + if err := esI.PurgeIndexes(); err != nil { + return err + } + } else { + err := model.NewAppError("PurgeElasticsearchIndexes", "ent.elasticsearch.test_config.license.error", nil, "", http.StatusNotImplemented) + return err + } + + return nil +} |