Skip to content

Instantly share code, notes, and snippets.

@jomaora
Last active February 14, 2019 17:34
Show Gist options
  • Save jomaora/1287a2e45c10aa0243ddabf3c3a64870 to your computer and use it in GitHub Desktop.
Save jomaora/1287a2e45c10aa0243ddabf3c3a64870 to your computer and use it in GitHub Desktop.
// 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