Fix some stuff in account API calls. still need to solve location.

This commit is contained in:
James Cole
2021-03-08 17:56:21 +01:00
parent 4d34160ede
commit 2a975c302f
5 changed files with 40 additions and 26 deletions

View File

@@ -63,7 +63,7 @@ class UpdateController extends Controller
* Update account.
*
* @param UpdateRequest $request
* @param Account $account
* @param Account $account
*
* @return JsonResponse
*/
@@ -71,8 +71,9 @@ class UpdateController extends Controller
{
$data = $request->getUpdateData();
$data['type'] = config('firefly.shortNamesByFullName.' . $account->accountType->type);
$this->repository->update($account, $data);
$manager = $this->getManager();
$account = $this->repository->update($account, $data);
$manager = $this->getManager();
$account->refresh();
/** @var AccountTransformer $transformer */
$transformer = app(AccountTransformer::class);