Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created March 31, 2020 12:36
Show Gist options
  • Save manakuro/a7cc638b2cadd46dfb101b8fd4a1d597 to your computer and use it in GitHub Desktop.
Save manakuro/a7cc638b2cadd46dfb101b8fd4a1d597 to your computer and use it in GitHub Desktop.
const updateUser = async (user) => {
try {
await axios.post('/users', user)
await axios.post('/user/profile', user.profile)
const email = new Email()
await email.send(user.email, 'User has been updated successfully')
const logger = new Logger()
logger.notify()
} catch (e) {
console.log(e)
throw new Error(e)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment