Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
API Toucan
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
Container registry
Model registry
Operate
Environments
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
Damien Armillon
API Toucan
Commits
50d7b8ed
Commit
50d7b8ed
authored
6 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
Début de la documentation de l'API
parent
9e0bbb40
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
backend/routes/routesToucan.js
+1
-1
1 addition, 1 deletion
backend/routes/routesToucan.js
doc/API.md
+16
-0
16 additions, 0 deletions
doc/API.md
with
17 additions
and
1 deletion
backend/routes/routesToucan.js
+
1
−
1
View file @
50d7b8ed
...
@@ -38,7 +38,7 @@ router.route("/toucans")
...
@@ -38,7 +38,7 @@ router.route("/toucans")
if
(
err
)
{
if
(
err
)
{
res
.
send
(
err
);
res
.
send
(
err
);
}
else
{
}
else
{
res
.
send
({
message
:
"
Toucan ajouté !
"
});
res
.
send
({
message
:
"
Toucan ajouté !
"
,
id
:
id
});
}
}
});
});
});
});
...
...
This diff is collapsed.
Click to expand it.
doc/API.md
0 → 100644
+
16
−
0
View file @
50d7b8ed
# Documentation API
L'api permet d'effectuer les actions suivantes sur les routes données :
1.
`api/toucans`
:
*
`GET`
: Renvoie une liste contenant tous les toucans de la bdd. Les toucans sont sous la forme d'objets avec les champs _id, date et title.
*
`POST`
: Permet de sauvegarder un toucan, prend en champs :
* `date` : Au format Date
* `title` : Une String
* `toucan` : Un pdf
* `cover` : Au format png ou jpg
Si l'oppération est un succès, on renvoie un message de succès et l'id du toucan enregistré.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment