-
-
Save JWLangford/c0b23689591fc64cc8c4dcdb78327ea7 to your computer and use it in GitHub Desktop.
This file contains 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
const getUser = async (id: string): Promise<{userState: IUserState, billingState: IBillingState}> => { | |
const response = await axios.get(`/user/${id}`); | |
return splitUser(response.data); | |
}; | |
const updateUser = async (user: IUserState, billing: IBillingState): Promise<void> => { | |
return await axios.put("/user", { ...combineUserAndBilling(user, billing) }); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment