Return a delete count from the delete-all response helpers

`response delete` had to run its own list first just to report how many
it removed, which duplicated the query the helper already does. Both
helpers now return the count instead.

`cmd_delete_all_http_responses` was returning the helper's value
directly, so it keeps its `()` result explicitly and the frontend
contract is unchanged.
This commit is contained in:
Gregory Schier
2026-08-13 22:09:08 -07:00
parent f53887a114
commit 6b0d553dc5
3 changed files with 11 additions and 15 deletions
+3 -2
View File
@@ -1630,10 +1630,11 @@ async fn cmd_delete_all_http_responses<R: Runtime>(
app_handle: AppHandle<R>,
window: WebviewWindow<R>,
) -> YaakResult<()> {
Ok(app_handle.db().delete_all_http_responses_for_request(
app_handle.db().delete_all_http_responses_for_request(
request_id,
&UpdateSource::from_window_label(window.label()),
)?)
)?;
Ok(())
}
#[tauri::command]