Skip to content

Instantly share code, notes, and snippets.

@JWLangford
Last active April 13, 2021 11:55
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 JWLangford/4acefa185ffccf21701d9e1457ed64b7 to your computer and use it in GitHub Desktop.
Save JWLangford/4acefa185ffccf21701d9e1457ed64b7 to your computer and use it in GitHub Desktop.
const getUser = async (id: string): Promise<IUserState> => {
const response = await axios.get(`/user/${id}`);
return buildUserState(response.data);
};
const updateUser = async (user: IUserState): Promise<void> => {
return await axios.put("/user", { ...buildBackendUser(user) });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment