MMCTL: Add import delete cmd for removing the import files (#29764)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
Harsh Aulakh
2025-06-10 15:36:38 +05:30
коммит произвёл GitHub
родитель 0cf6361139
Коммит 09a2037b61
17 изменённых файлов: 348 добавлений и 35 удалений

Просмотреть файл

@@ -410,3 +410,15 @@ func (a *App) ListImports() ([]string, *model.AppError) {
return results, nil
}
func (a *App) DeleteImport(name string) *model.AppError {
filePath := filepath.Join(*a.Config().ImportSettings.Directory, name)
if ok, err := a.FileExists(filePath); err != nil {
return err
} else if !ok {
return nil
}
return a.RemoveFile(filePath)
}