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:
+7
-2
@@ -35,11 +35,16 @@ function UncategorizeBankTransactionsBulkAlert({
|
||||
uncategorizeTransactions({ ids: uncategorizeTransactionsIds })
|
||||
.then(() => {
|
||||
AppToaster.show({
|
||||
message: 'The bank feeds of the bank account has been resumed.',
|
||||
message: 'The selected transactions have been uncategorized.',
|
||||
intent: Intent.SUCCESS,
|
||||
});
|
||||
})
|
||||
.catch((error) => {})
|
||||
.catch((error) => {
|
||||
AppToaster.show({
|
||||
message: 'Something went wrong while uncategorizing transactions.',
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
closeAlert(name);
|
||||
});
|
||||
|
||||
@@ -37,8 +37,8 @@ export function useUncategorizeTransactionsBulkAction(
|
||||
UncategorizeTransactionsBulkValues
|
||||
>(
|
||||
(value) =>
|
||||
apiRequest.post(`/cashflow/transactions/uncategorize/bulk`, {
|
||||
ids: value.ids,
|
||||
apiRequest.delete(`/banking/categorize/bulk`, {
|
||||
params: { uncategorizedTransactionIds: value.ids },
|
||||
}),
|
||||
{
|
||||
onSuccess: (res, values) => {
|
||||
|
||||
Reference in New Issue
Block a user