mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-28 04:27:24 +00:00
Add bio management feature with UI and backend support
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user