Clear all HTTP request logs (#49)

* Create mutation to clear request logs

* Add UI for clearing all HTTP request logs

* Use consistent naming

* Explicitly delete only from http_requests

* Check if datebase is open

* Add confirmation dialog
This commit is contained in:
Michał Załęcki
2020-11-28 15:48:19 +01:00
committed by GitHub
parent efc115e961
commit e59b9d6663
12 changed files with 385 additions and 105 deletions

View File

@ -99,6 +99,10 @@ func (svc *Service) SetRequestLogFilter(ctx context.Context, filter FindRequests
return svc.repo.UpsertSettings(ctx, "reqlog", svc)
}
func (svc *Service) ClearRequests(ctx context.Context) error {
return svc.repo.ClearRequestLogs(ctx)
}
func (svc *Service) addRequest(
ctx context.Context,
req http.Request,