mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Expand API so you can also submit IBAN, BIC or number for new accounts
This commit is contained in:
@@ -160,6 +160,10 @@ class BelongsUser implements Rule
|
||||
*/
|
||||
private function validateAccountId(int $value): bool
|
||||
{
|
||||
if (0 === $value) {
|
||||
// its ok to submit 0. other checks will fail.
|
||||
return true;
|
||||
}
|
||||
$count = Account::where('id', '=', $value)->where('user_id', '=', auth()->user()->id)->count();
|
||||
|
||||
return 1 === $count;
|
||||
|
Reference in New Issue
Block a user