mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Fix for #2446
This commit is contained in:
@@ -226,7 +226,14 @@ class PiggyBankController extends Controller
|
||||
*/
|
||||
public function update(PiggyBankRequest $request, PiggyBank $piggyBank): JsonResponse
|
||||
{
|
||||
$piggyBank = $this->repository->update($piggyBank, $request->getAll());
|
||||
$data = $request->getAll();
|
||||
$piggyBank = $this->repository->update($piggyBank, $data);
|
||||
|
||||
if ('' !== $data['current_amount']) {
|
||||
$this->repository->setCurrentAmount($piggyBank, $data['current_amount']);
|
||||
}
|
||||
|
||||
|
||||
$manager = new Manager();
|
||||
$baseUrl = $request->getSchemeAndHttpHost() . '/api/v1';
|
||||
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
||||
|
Reference in New Issue
Block a user