add settings.

This commit is contained in:
2023-03-01 11:14:48 +08:00
parent b66fbe594b
commit b07489723c
5 changed files with 416 additions and 382 deletions

View File

@@ -144,3 +144,15 @@ export function getContestRank(
},
})
}
export function uploadAvatar(file: File) {
const form = new window.FormData()
form.append("image", file)
return http.post("upload_avatar", form, {
headers: { "content-type": "multipart/form-data" },
})
}
export function updateProfile(data: { real_name: string; mood: string }) {
return http.put("profile", data)
}