feat: add update user profile API

This commit is contained in:
Damillora 2025-02-22 17:38:18 +00:00
parent 374ee82c76
commit 0fab0b7f48

View File

@ -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";