aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/http/user.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-13 21:23:30 +0800
committercrupest <crupest@outlook.com>2021-02-13 21:23:30 +0800
commitfe5128137f530daf8ca315cb89811121c6c2c9da (patch)
tree34cbdb7895e18d34779b2209a1e9aae0fde20cf2 /FrontEnd/src/app/http/user.ts
parentaeed3cb80d8c0a62d0ccc565733c4a213759c5bd (diff)
downloadtimeline-fe5128137f530daf8ca315cb89811121c6c2c9da.tar.gz
timeline-fe5128137f530daf8ca315cb89811121c6c2c9da.tar.bz2
timeline-fe5128137f530daf8ca315cb89811121c6c2c9da.zip
...
Diffstat (limited to 'FrontEnd/src/app/http/user.ts')
-rw-r--r--FrontEnd/src/app/http/user.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/FrontEnd/src/app/http/user.ts b/FrontEnd/src/app/http/user.ts
index c6a567d3..dcb222bf 100644
--- a/FrontEnd/src/app/http/user.ts
+++ b/FrontEnd/src/app/http/user.ts
@@ -61,7 +61,7 @@ export interface IHttpUserClient {
get(username: string): Promise<HttpUser>;
patch(username: string, req: HttpUserPatchRequest): Promise<HttpUser>;
delete(username: string): Promise<void>;
- // return etag
+ generateAvatarUrl(username: string): string;
putAvatar(username: string, data: Blob): Promise<string>;
changePassword(req: HttpChangePasswordRequest): Promise<void>;
putUserPermission(
@@ -100,6 +100,10 @@ export class HttpUserClient implements IHttpUserClient {
return axios.delete(`${apiBaseUrl}/users/${username}`).then();
}
+ generateAvatarUrl(username: string): string {
+ return `${apiBaseUrl}/users/${username}/avatar`;
+ }
+
putAvatar(username: string, data: Blob): Promise<string> {
return axios
.put(`${apiBaseUrl}/users/${username}/avatar`, data, {