Closed rajdip-b closed 3 months ago
This will cause the return type of affected methods to be Objects such that to hold those required fields right? And currently these methods return Arrays of Objects. The new result would be like { items : [...], metadata:{...}}
Exactly!
Can you assign me the whole list of issues? As of now I have implemented locally for the Project module.
Hey @muntaxir4! Yeah, I think I can do that. Just note that, you would need to make the commits and put up the PR in the hackathon window :)
Description
Add the following fields when returning paginated response in every module:
page
: The current page numberperPage
: The number of items per pagepageCount
: The total page counttotalCount
: The total number of items presentlinks
(All links to have the relative path. For example:/api/environment/all/:projectId?<query>
)self
: The link to this current pagefirst
: The link to the first pageprevious
: The link to the previous pagenext
: The link to the next pagelast
: The link to the last pageWe want the computation to be done in the service classes.
Solution
common
module and name itpaginate
. This function should take in the page details and generate the pagination metadataitems
and the metadata inmetadata
Objectives
This issue is the parent issue. Below you will find a list of issues that relate to this. These issues encompass the scope of change in every module:
345
337
338
339
340
341
342
343
344