Skip to content

Instantly share code, notes, and snippets.

@paulogdm
Created July 29, 2018 10:54
Show Gist options
  • Save paulogdm/dfec8002f539cdd4bf9a3ee22efbb480 to your computer and use it in GitHub Desktop.
Save paulogdm/dfec8002f539cdd4bf9a3ee22efbb480 to your computer and use it in GitHub Desktop.
const router = async (req, res) => {
if (req.method === 'POST') {
return postS3(req, res)
} else if (req.method === 'GET') {
return getS3(req, res)
} else {
throw createError(405, 'Invalid method')
}
}
module.exports => router
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment