Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CaCaoCritics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bilel El Yaagoubi
CaCaoCritics
Merge requests
!21
front, genre etc
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
front, genre etc
end-front
into
master
Overview
0
Commits
4
Pipelines
2
Changes
5
Merged
front, genre etc
Juliette Kalflèche
requested to merge
end-front
into
master
Jun 10, 2022
Overview
0
Commits
4
Pipelines
2
Changes
5
0
0
Merge request reports
Viewing commit
6c40e873
Prev
Next
Show latest version
5 files
+
95
−
72
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
6c40e873
start to work with back
· 6c40e873
Juliette Kalflèche
authored
Jun 10, 2022
backend/routes/genres.js
+
8
−
11
View file @ 6c40e873
Edit in single-file editor
Open in Web IDE
Show full file
@@ -4,17 +4,14 @@ const router = express.Router();
module
.
exports
=
router
;
// router.get("/popular/:number", async function (req, res) {
// try {
// const filmNumber = await req.params["number"];
// const getGenres = await GenreModel.find({})
// .sort({ popularity: "desc" })
// .limit(filmNumber);
// res.send(getGenres);
// } catch (error) {
// console.log(error);
// }
// });
router
.
get
(
"
/
"
,
async
function
(
req
,
res
)
{
try
{
const
getGenres
=
await
GenreModel
.
find
({});
res
.
send
(
getGenres
);
}
catch
(
error
)
{
console
.
log
(
error
);
}
});
router
.
get
(
"
/genre/id/:id
"
,
async
function
(
req
,
res
)
{
try
{
Loading