Created
January 7, 2019 21:54
-
-
Save thejohnfreeman/104a4a5fea757070e8ead1d0c520d325 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
async function getFullName(username, password) { | |
let token | |
try { | |
token = await logIn(username, password); | |
} catch (error) { | |
console.error('wrong username or password') | |
return | |
} | |
const user = await getUser(token) | |
return user.fullName | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment