jmprathab / MyHome

A Java application which helps people to manage their apartment.
Apache License 2.0
92 stars 106 forks source link

Bugfix/issue 260 fix postman collection #276

Open bayotheman opened 1 year ago

bayotheman commented 1 year ago

πŸš€ 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