mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Small code cleanup.
This commit is contained in:
@@ -68,14 +68,12 @@ class UpdateController extends Controller
|
||||
$account->refresh();
|
||||
app('preferences')->mark();
|
||||
|
||||
$transformer = new AccountTransformer();
|
||||
$transformer = new AccountTransformer();
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
return response()
|
||||
->api($this->jsonApiObject('accounts', $account, $transformer))
|
||||
->header('Content-Type', self::CONTENT_TYPE)
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,12 @@ use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateRequest extends FormRequest
|
||||
{
|
||||
use ChecksLogin;
|
||||
use AppendsLocationData;
|
||||
use ChecksLogin;
|
||||
use ConvertsDataTypes;
|
||||
|
||||
/**
|
||||
* TODO is a duplicate of the v1 update thing.
|
||||
* @return array
|
||||
*/
|
||||
public function getUpdateData(): array
|
||||
{
|
||||
@@ -114,6 +113,4 @@ class UpdateRequest extends FormRequest
|
||||
|
||||
return Location::requestRules($rules);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -293,7 +293,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
return $dbQuery->take($limit)->get(['accounts.*']);
|
||||
}
|
||||
|
||||
#[\Override] public function update(Account $account, array $data): Account
|
||||
#[\Override]
|
||||
public function update(Account $account, array $data): Account
|
||||
{
|
||||
/** @var AccountUpdateService $service */
|
||||
$service = app(AccountUpdateService::class);
|
||||
|
||||
@@ -72,7 +72,7 @@ interface AccountRepositoryInterface
|
||||
|
||||
public function setUser(User $user): void;
|
||||
|
||||
public function update(Account $account,array $data): Account;
|
||||
public function update(Account $account, array $data): Account;
|
||||
|
||||
public function setUserGroup(UserGroup $userGroup): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user