Created
March 31, 2020 12:36
-
-
Save manakuro/a7cc638b2cadd46dfb101b8fd4a1d597 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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