Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Damien Armillon
API Toucan
Commits
9ccb0181
Commit
9ccb0181
authored
Jan 16, 2022
by
Inès Yeterian
Browse files
go back to normal for now
parent
808dc095
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/routes/routesToucan.js
View file @
9ccb0181
...
...
@@ -124,9 +124,9 @@ router.route("/img/:id")
}
});
router
.
route
(
"
/pdf/:
id
"
)
.
get
(
celebrate
({
params
:
valid
Id
}),
function
(
req
,
res
)
{
Toucan
.
findOne
({
_id
:
mongoose
.
Type
.
ObjectId
(
req
.
params
.
id
)
},
(
err
,
data
)
=>
{
router
.
route
(
"
/pdf/:
title
"
)
.
get
(
celebrate
({
params
:
valid
Title
}),
function
(
req
,
res
)
{
Toucan
.
findOne
({
title
:
req
.
params
.
title
},
(
err
,
data
)
=>
{
if
(
err
)
{
res
.
end
(
500
);
return
;
...
...
@@ -139,4 +139,5 @@ router.route("/pdf/:id")
}
);});
module
.
exports
=
router
;
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment