implemented user edit in frontend

This commit is contained in:
Alex Phillips 2022-02-05 11:58:43 -05:00
parent 16cd8a41ad
commit 7fe2d075d4

View File

@ -36,6 +36,15 @@ export default class API {
return response.data.data
}
static async updateUser(email, password, currentPassword) {
const response = await axios.put('/api/users', {
email,
...(password && currentPassword && { password, currentPassword }),
})
return response.data.data
}
static async createBudget(name) {
const response = await axios.post(`/api/budgets`, {
name,