AltCamp / altcampv1-backend

AltCamp is an e-learning platform that allows students to post messages to the discussion threads, interact and receive feedback from other students and instructors, and hence create a deeper understanding of the subject matter being discussed.
https://altcamp.onrender.com
MIT License
13 stars 17 forks source link

[Feature]: Add count field to getAllPosts api response #217

Closed Yinkajay closed 1 year ago

Yinkajay commented 1 year ago

Contact Details

No response

The Problem

When a get all posts request is made to the api, it should return a count value for the number of posts in the database, whether the request data is paginated or not.

How to Fix It

Get the length of the data array returned which is just the number of posts.

Additional Context

No response

Specific File Path(s) on the Repo to be Modified/Refered to

No response

Code of Conduct

tobisupreme commented 1 year ago

Hi @Yinkajay! I can take this on. Thanks for the request.