Included PageInfo object as an instance variable in the GetCommunityDetailsResponse component. I also included a
listAllWithPages(Pageable pageable) method which returns Page object in the CommunityService interface, and implemented in the CommunitySDJpaService. This method was used in the listAllCommunities method in the CommunityController class.
π Motivation and Context
When you list all communities by GET /communities, you get all the communities in a communities array, you can also page
them using page and size query parameters, but no pageInfo object is returned, which is required for further pagination
on the front-end.
This change was added to include page information to navigate the list of communities returned by the GET /communities
request.
https://github.com/jmprathab/MyHome/issues/262
π§ͺ How Has This Been Tested?
Mockito unit test and postman test
π· Screenshots (if appropriate)
π¦ Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
β Checklist
[x] My code follows the code style of this project(Do your best to follow code styles. If none apply just skip this).
[ ] My change requires a change to the documentation.
π Description
Included PageInfo object as an instance variable in the GetCommunityDetailsResponse component. I also included a listAllWithPages(Pageable pageable) method which returns Page object in the CommunityService interface, and implemented in the CommunitySDJpaService. This method was used in the listAllCommunities method in the CommunityController class.
π Motivation and Context
When you list all communities by GET /communities, you get all the communities in a communities array, you can also page them using page and size query parameters, but no pageInfo object is returned, which is required for further pagination on the front-end. This change was added to include page information to navigate the list of communities returned by the GET /communities request. https://github.com/jmprathab/MyHome/issues/262
π§ͺ How Has This Been Tested?
Mockito unit test and postman test
π· Screenshots (if appropriate)
π¦ Types of changes
β Checklist