Kaichou-Project / kaichou-graduation

o7
11 stars 15 forks source link

Implement Pagination in Endpoint for Fetching All Messages #43

Closed nyxordinal closed 3 years ago

nyxordinal commented 3 years ago

Currently, the endpoint for retrieving all messages returns all message documents from mongoDB as is.
This is certainly will affect the load time. In order to fix this, we'll implement pagination in that endpoint.
For starting point, you can search for pagination in mongoose because we use mongoose as ODM for the MongoDB Route for the endpoint is GET /message, you can find it in route.ts

TakoLeakest commented 3 years ago

I'll do this!

nyxordinal commented 3 years ago

good luck !