1
0

fix: bulk uncategorize transactions API endpoint (#1054)

* fix: bulk uncategorize transactions - fix API endpoint and error handling

* 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>

---------

Co-authored-by: Ahmed Bouhuolia <a.bouhuolia@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rmb
2026-03-28 01:30:19 +11:00
committed by GitHub
parent ad0451f32d
commit 580392a408
2 changed files with 9 additions and 4 deletions
@@ -35,11 +35,16 @@ function UncategorizeBankTransactionsBulkAlert({
uncategorizeTransactions({ ids: uncategorizeTransactionsIds }) uncategorizeTransactions({ ids: uncategorizeTransactionsIds })
.then(() => { .then(() => {
AppToaster.show({ AppToaster.show({
message: 'The bank feeds of the bank account has been resumed.', message: 'The selected transactions have been uncategorized.',
intent: Intent.SUCCESS, intent: Intent.SUCCESS,
}); });
}) })
.catch((error) => {}) .catch((error) => {
AppToaster.show({
message: 'Something went wrong while uncategorizing transactions.',
intent: Intent.DANGER,
});
})
.finally(() => { .finally(() => {
closeAlert(name); closeAlert(name);
}); });
@@ -37,8 +37,8 @@ export function useUncategorizeTransactionsBulkAction(
UncategorizeTransactionsBulkValues UncategorizeTransactionsBulkValues
>( >(
(value) => (value) =>
apiRequest.post(`/cashflow/transactions/uncategorize/bulk`, { apiRequest.delete(`/banking/categorize/bulk`, {
ids: value.ids, params: { uncategorizedTransactionIds: value.ids },
}), }),
{ {
onSuccess: (res, values) => { onSuccess: (res, values) => {