-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feat/movies db #260
base: main
Are you sure you want to change the base?
Feat/movies db #260
Conversation
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.
Please update the swagger.yaml file and include these apis in public api section
|
||
const getMovies = asyncHandler(async (req, res) => { | ||
const page = +(req.query.page || 1); | ||
const limit = +(req.query.limit || 10); |
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.
Add more query parameters to make this api more dynamic. refer:
const getBooks = asyncHandler(async (req, res) => { |
const getSeries = asyncHandler(async (req, res) => { | ||
const page = +(req.query.page || 1); | ||
const limit = +(req.query.limit || 10); | ||
const paginatedMovies = getPaginatedPayload(seriesJson, page, 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.
Add more query parameters to make this api more dynamic. refer:
const getBooks = asyncHandler(async (req, res) => { |
This pull request introduces new routes and controllers for handling movies and series data. The most important changes include adding new routes for movies and series, creating controllers to manage these routes, and updating the main application file to include the new routes.
New Routes and Controllers:
Movies Routes and Controllers:
moviesRouter
import and usage insrc/app.js
to handle movies-related API endpoints. (src/app.js
[1] [2]movies.controllers.js
to manage movies data, including fetching movies and fetching a movie by ID. (src/controllers/public/movies.controllers.js
src/controllers/public/movies.controllers.jsR1-R33)movies.routes.js
to define the routes for movies API endpoints. (src/routes/public/movies.routes.js
src/routes/public/movies.routes.jsR1-R12)Series Routes and Controllers:
seriesRouter
import and usage insrc/app.js
to handle series-related API endpoints. (src/app.js
[1] [2]series.controllers.js
to manage series data, including fetching series and fetching a series by ID. (src/controllers/public/series.controllers.js
src/controllers/public/series.controllers.jsR1-R33)series.routes.js
to define the routes for series API endpoints. (src/routes/public/series.routes.js
src/routes/public/series.routes.jsR1-R12)