New: Clear all history from History page

This commit is contained in:
Qstick
2021-04-22 23:43:58 -04:00
parent aa6bda7226
commit eb328d7c22
10 changed files with 98 additions and 17 deletions

View File

@@ -31,7 +31,8 @@ namespace NzbDrone.Core.History
IHandle<IndexerQueryEvent>,
IHandle<IndexerDownloadEvent>,
IHandle<IndexerAuthEvent>,
IExecute<CleanUpHistoryCommand>
IExecute<CleanUpHistoryCommand>,
IExecute<ClearHistoryCommand>
{
private readonly IHistoryRepository _historyRepository;
private readonly IConfigService _configService;
@@ -197,5 +198,10 @@ namespace NzbDrone.Core.History
{
Cleanup();
}
public void Execute(ClearHistoryCommand message)
{
_historyRepository.Purge(vacuum: true);
}
}
}