Skip to content

Instantly share code, notes, and snippets.

@ggondim
Created June 17, 2020 23:56
Show Gist options
  • Save ggondim/514432a09b93bcd8e0e2b687eb32226f to your computer and use it in GitHub Desktop.
Save ggondim/514432a09b93bcd8e0e2b687eb32226f to your computer and use it in GitHub Desktop.
Function Blend Anti-Pattern
async function entryPoint(context) {
if (context.req.method === 'GET') {
// it is a "get single resource" operation
} else if (context.req.method === 'PUT') {
// it is a "replace resource" operation
} else {
// must respond with 403 forbidden or not supported
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment