Created
July 9, 2022 16:13
-
-
Save dsibinski/ac10bdf2e256f549939d6eeed68067aa 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
getAllUsers = async (): Promise<UserViewModel[]> => { | |
const url = `${this.apiEndpoint}/AllUsers`; | |
const response = await fetch(url); | |
const usersJson = await response.json(); | |
const users = z.array(UserViewModelSchema).parse(usersJson); | |
return users; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment