Skip to content

Instantly share code, notes, and snippets.

@diego3g
Created December 18, 2017 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diego3g/7ba2f93423f2951dd97d616823974662 to your computer and use it in GitHub Desktop.
Save diego3g/7ba2f93423f2951dd97d616823974662 to your computer and use it in GitHub Desktop.
async function fetchUser() {
const response = await api.get('/users/diego3g');
return response;
}
async function fetchGroups() {
const user = await fetchUser();
const response = await api.get(`/groups/${user.id}`);
console.log(response);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment