Fix some issues with BudgetController
Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
parent
3d3c464416
commit
56725e563c
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ class BudgetController extends Controller
|
|||
{
|
||||
try {
|
||||
$userPermission = $this->userPermissionMapper->find($id, $this->userId);
|
||||
return new DataResponse($this->budgetMapper->find($userPermission->budgetId));
|
||||
return new DataResponse($this->budgetMapper->find($userPermission->getBudgetId()));
|
||||
} catch (Exception $e) {
|
||||
return new DataResponse([], Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class BudgetController extends Controller
|
|||
$userPermission->setBudgetId($budget->getId());
|
||||
$userPermission->setUserId($user);
|
||||
$userPermission->setPermission($permission);
|
||||
$userPermission = $this->userPermissionMapper->save($userPermission);
|
||||
$userPermission = $this->userPermissionMapper->insert($userPermission);
|
||||
array_push($userPermissions, $userPermission);
|
||||
}
|
||||
$budget->setUsers($userPermissions);
|
||||
|
|
Loading…
Reference in a new issue