Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Created July 9, 2022 14:23
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 dsibinski/44438baa3b6ece08a191b0e918c01a77 to your computer and use it in GitHub Desktop.
Save dsibinski/44438baa3b6ece08a191b0e918c01a77 to your computer and use it in GitHub Desktop.
getAllUsers = async (): Promise<UserViewModel[]> => {
const url = `${this.apiEndpoint}/AllUsers`;
const response = await fetch(url);
const users = (await response.json()) as UserViewModel[];
return users;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment