MyHome icon indicating copy to clipboard operation
MyHome copied to clipboard

Bugfix/issue 262 page info missing on communities

Open bayotheman opened this issue 2 years ago โ€ข 0 comments

๐Ÿš€ Description

Included PageInfo object as an instance variable in the GetCommunityDetailsResponse component. I also included a listAllWithPages(Pageable pageable) method which returns Page<Community> 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.
  • [ ] I have updated the documentation accordingly.

bayotheman avatar Oct 31 '22 20:10 bayotheman