File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class ExpenseController(
4747 pageable : Pageable
4848 ) = when {
4949 authentication.isAdmin() -> expenseService.findAllByPersonCode(personCode, pageable)
50- else -> expenseService.findAllByPersonCode (authentication.name, pageable)
50+ else -> expenseService.findAllByPersonUserCode (authentication.name, pageable)
5151 }
5252 .toResponse()
5353
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import java.util.UUID
1717@Repository
1818interface ExpenseRepository : PagingAndSortingRepository <Expense , UUID >{
1919 fun findAllByPersonCode (personCode : String , pageable : Pageable ): Page <Expense >
20+ fun findAllByPersonUserCode (personCode : String , pageable : Pageable ): Page <Expense >
2021 fun findAllByStatus (status : Status ):Iterable <Expense >
2122}
2223
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ class ExpenseService(
3535 fun findAllByPersonCode (personCode : String , pageable : Pageable ): Page <Expense > = expenseRepository
3636 .findAllByPersonCode(personCode, pageable)
3737
38+ fun findAllByPersonUserCode (personCode : String , pageable : Pageable ): Page <Expense > = expenseRepository
39+ .findAllByPersonUserCode(personCode, pageable)
40+
3841 fun findAllByStatus (status : Status ) = expenseRepository.findAllByStatus(status)
3942
4043 @Transactional
You can’t perform that action at this time.
0 commit comments