diff --git a/src/main/kotlin/com/wbrawner/budgetserver/transaction/TransactionController.kt b/src/main/kotlin/com/wbrawner/budgetserver/transaction/TransactionController.kt index fd392d7..1756645 100644 --- a/src/main/kotlin/com/wbrawner/budgetserver/transaction/TransactionController.kt +++ b/src/main/kotlin/com/wbrawner/budgetserver/transaction/TransactionController.kt @@ -47,8 +47,9 @@ open class TransactionController( @RequestParam sortOrder: Sort.Direction? ): ResponseEntity> { val budgets = if (budgetIds != null) { - userPermissionsRepository.findAllByUser( + userPermissionsRepository.findAllByUserAndBudget_IdIn( user = getCurrentUser()!!, + budgetIds = budgetIds.toList(), pageable = PageRequest.of(page ?: 0, count ?: 1000)) } else { userPermissionsRepository.findAllByUser(getCurrentUser()!!, null)