-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sacha GRASSO
committed
Jan 3, 2018
1 parent
04d8d6d
commit 43ee2c5
Showing
4 changed files
with
180 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
module.exports = { | ||
list(req, res, next) { | ||
res.json({ message: 'You did GET a collection from beta' }); | ||
listAll(req, res, next) { | ||
res.status(200).json({ message: 'You did GET a collection from beta' }); | ||
}, | ||
find(req, res, next) { | ||
res.json({ message: 'You did GET a single document from beta' }); | ||
findOne(req, res, next) { | ||
res.status(200).json({ message: 'You did GET a single document from beta' }); | ||
}, | ||
create(req, res, next) { | ||
res.json({ message: 'You did POST a single document from beta' }); | ||
createOne(req, res, next) { | ||
res.status(200).json({ message: 'You did POST a single document from beta' }); | ||
}, | ||
update(req, res, next) { | ||
res.json({ message: 'You did PUT/PATCH a single document from beta' }); | ||
updateOne(req, res, next) { | ||
res.status(200).json({ message: 'You did PUT/PATCH a single document from beta' }); | ||
}, | ||
delete(req, res, next) { | ||
res.json({ message: 'You did DELETE a single document from beta' }); | ||
deleteOne(req, res, next) { | ||
res.status(200).json({ message: 'You did DELETE a single document from beta' }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
module.exports = { | ||
list(req, res, next) { | ||
res.json({ message: 'You did GET a collection from index' }); | ||
res.status(200).json({ message: 'You did GET a collection from index' }); | ||
}, | ||
find(req, res, next) { | ||
res.json({ message: 'You did GET a single document from index' }); | ||
res.status(200).json({ message: 'You did GET a single document from index' }); | ||
}, | ||
create(req, res, next) { | ||
res.json({ message: 'You did POST a single document from index' }); | ||
res.status(200).json({ message: 'You did POST a single document from index' }); | ||
}, | ||
update(req, res, next) { | ||
res.json({ message: 'You did PUT/PATCH a single document from index' }); | ||
res.status(200).json({ message: 'You did PUT/PATCH a single document from index' }); | ||
}, | ||
delete(req, res, next) { | ||
res.json({ message: 'You did DELETE a single document from index' }); | ||
res.status(200).json({ message: 'You did DELETE a single document from index' }); | ||
} | ||
} |