-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added backend route for fetching topic data #153
Conversation
Our team will soon review your PR. Thanks @Icelain :) |
The endpoint looks okay! but I was thinking if you could fetch the topics data from the MongoDB database? |
Oh yeah I was wondering about that. Didn't know earlier but thanks for the confirmation. I'll work on it. |
hey I made the changes. Is it okay? |
Yeah, it looks good but it would be great if you could paginate the response. You can see this controller for reference. |
let nextPage: number | null = null; | ||
let prevPage: number | null = null; | ||
|
||
const limit = Number(req.query.limit) === 0 ? 15 : Number(req.query.limit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change default to 0 i.e. no limit
I made the limit 0 by default :) |
LGTM 🎉 |
Thank you @Icelain for taking out your valuable time in order to contribute to our project. Looking forward for more such amazing contributions :). |
Route is: /api/get-topics. Partially improves #152