mirror of
https://github.com/linuxserver/budge.git
synced 2026-03-09 00:08:38 +08:00
implemented user edit in frontend
This commit is contained in:
parent
16cd8a41ad
commit
7fe2d075d4
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user