Add address to user.

This commit is contained in:
Yang Luo
2021-06-04 20:47:27 +08:00
parent 7434d0f3d3
commit 081da18403
7 changed files with 147 additions and 35 deletions

View File

@ -64,6 +64,18 @@ export function deleteUser(user) {
}).then(res => res.json());
}
export function getAddressOptions(url) {
return fetch(url, {
method: "GET",
}).then(res => res.json());
}
export function getAffiliationOptions(url, code) {
return fetch(`${url}/${code}`, {
method: "GET",
}).then(res => res.json());
}
export function uploadAvatar(avatar) {
let account;
AuthBackend.getAccount("").then((res) => {