Add bio management feature with UI and backend support

This commit is contained in:
2025-05-17 21:34:16 +08:00
parent 864632e682
commit 38999d844d
8 changed files with 136 additions and 8 deletions

View File

@@ -172,6 +172,21 @@ class Network {
}
}
async changeBio(bio: string): Promise<Response<User>> {
try {
const response = await axios.postForm(`${this.apiBaseUrl}/user/bio`, {
bio
})
return response.data
} catch (e: any) {
console.error(e)
return {
success: false,
message: e.toString(),
}
}
}
getUserAvatar(user: User): string {
return this.baseUrl + user.avatar_path
}