refactor: use params object instead of URLSearchParams for delete request
Simplifies the API call by passing params object directly to the delete method instead of manually building URLSearchParams. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,16 +36,10 @@ export function useUncategorizeTransactionsBulkAction(
|
||||
Error,
|
||||
UncategorizeTransactionsBulkValues
|
||||
>(
|
||||
(value) => {
|
||||
// Build query string with multiple uncategorizedTransactionIds parameters
|
||||
const params = new URLSearchParams();
|
||||
value.ids.forEach((id) =>
|
||||
params.append('uncategorizedTransactionIds', String(id)),
|
||||
);
|
||||
return apiRequest.delete(
|
||||
`/banking/categorize/bulk?${params.toString()}`,
|
||||
);
|
||||
},
|
||||
(value) =>
|
||||
apiRequest.delete(`/banking/categorize/bulk`, {
|
||||
params: { uncategorizedTransactionIds: value.ids },
|
||||
}),
|
||||
{
|
||||
onSuccess: (res, values) => {
|
||||
// Invalidate the account uncategorized transactions.
|
||||
|
||||
Reference in New Issue
Block a user