Last active
February 14, 2019 17:34
-
-
Save jomaora/1287a2e45c10aa0243ddabf3c3a64870 to your computer and use it in GitHub Desktop.
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
// supossing a POST to /repository/{repository}/skills | |
const skillsPOST = async context => { | |
try { | |
const {params, req} = exegesisContext; | |
const repository = params.path.repository; | |
const {res, next, body} = req; | |
const newSkill = await createSkill(body); // my DAO fonction | |
return res.status(201).send(newSkill); | |
} catch(err) { | |
next(err); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment