mirror of
https://github.com/Damillora/Shioriko.git
synced 2025-02-23 17:33:39 +00:00
feat: add update user profile API
This commit is contained in:
parent
374ee82c76
commit
0fab0b7f48
@ -200,6 +200,21 @@ export async function updateTag(id, { name, tagTypeId }) {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function updateUserProfile({ email, username, oldPassword, newPassword }) {
|
||||
const endpoint = url + "/api/tag/" + id;
|
||||
const response = await axios({
|
||||
url: endpoint,
|
||||
method: "PUT",
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + current_token,
|
||||
},
|
||||
withCredentials: true,
|
||||
data: {
|
||||
email, username, oldPassword, newPassword
|
||||
}
|
||||
})
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function getTagTypes() {
|
||||
const endpoint = url + "/api/tagtype";
|
||||
|
Loading…
x
Reference in New Issue
Block a user