Created
June 18, 2020 00:06
-
-
Save ggondim/4ce55fcf3b2f9abdbd6a4fd0f1f6687a to your computer and use it in GitHub Desktop.
Azure Monofunction example - User Controller
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
async function getUser({ req, res, params }) { | |
context.res.body = await db.getUser(params.id); | |
} | |
async function createUser({ req }) { | |
context.res.status = await db.createUser(req.body); | |
} | |
module.exports = { | |
getUser, | |
createUser, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment