mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
commit
8807f04599
@ -94,19 +94,39 @@ class DestroyController extends Controller
|
||||
case 'object_groups':
|
||||
$this->destroyObjectGroups();
|
||||
break;
|
||||
case 'not_assets_liabilities':
|
||||
$this->destroyAccounts(
|
||||
[
|
||||
AccountType::BENEFICIARY,
|
||||
AccountType::CASH,
|
||||
AccountType::CREDITCARD,
|
||||
AccountType::DEFAULT,
|
||||
AccountType::EXPENSE,
|
||||
AccountType::IMPORT,
|
||||
AccountType::INITIAL_BALANCE,
|
||||
AccountType::LIABILITY_CREDIT,
|
||||
AccountType::RECONCILIATION,
|
||||
AccountType::REVENUE,
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'accounts':
|
||||
$this->destroyAccounts(
|
||||
[
|
||||
AccountType::ASSET,
|
||||
AccountType::DEFAULT,
|
||||
AccountType::BENEFICIARY,
|
||||
AccountType::EXPENSE,
|
||||
AccountType::REVENUE,
|
||||
AccountType::INITIAL_BALANCE,
|
||||
AccountType::CASH,
|
||||
AccountType::CREDITCARD,
|
||||
AccountType::DEBT,
|
||||
AccountType::DEFAULT,
|
||||
AccountType::EXPENSE,
|
||||
AccountType::IMPORT,
|
||||
AccountType::INITIAL_BALANCE,
|
||||
AccountType::LIABILITY_CREDIT,
|
||||
AccountType::LOAN,
|
||||
AccountType::MORTGAGE,
|
||||
AccountType::CREDITCARD,
|
||||
AccountType::RECONCILIATION,
|
||||
AccountType::REVENUE,
|
||||
]
|
||||
);
|
||||
break;
|
||||
|
@ -53,7 +53,8 @@ class DestroyRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
$valid = 'budgets,bills,piggy_banks,rules,recurring,categories,tags,object_groups'.
|
||||
',accounts,asset_accounts,expense_accounts,revenue_accounts,liabilities,transactions,withdrawals,deposits,transfers';
|
||||
',accounts,asset_accounts,expense_accounts,revenue_accounts,liabilities,transactions,withdrawals,deposits,transfers'.
|
||||
',not_assets_liabilities';
|
||||
|
||||
return [
|
||||
'objects' => sprintf('required|min:1|string|in:%s', $valid),
|
||||
|
@ -318,7 +318,7 @@
|
||||
url = '{{ route('api.v1.data.purge') }}';
|
||||
}
|
||||
if (link.data('type') === 'unused_accounts') {
|
||||
url = deleteAPIRoute + '?objects=accounts&unused=true';
|
||||
url = deleteAPIRoute + '?objects=not_assets_liabilities&unused=true';
|
||||
}
|
||||
|
||||
// replace icon with loading thing
|
||||
|
Loading…
Reference in New Issue
Block a user