aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/users/user.service.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-01-13 09:12:55 +0100
committerGitHub <noreply@github.com>2021-01-13 09:12:55 +0100
commit1ea7da819e5bfae7b443ed722c18c4165d101439 (patch)
tree17cea3786dfb3a59a2ad5559de9ebf106a0440a2 /client/src/app/core/users/user.service.ts
parent75dd1b641f987e1e09dbaa3329e08c6e98a858f3 (diff)
downloadPeerTube-1ea7da819e5bfae7b443ed722c18c4165d101439.tar.gz
PeerTube-1ea7da819e5bfae7b443ed722c18c4165d101439.tar.zst
PeerTube-1ea7da819e5bfae7b443ed722c18c4165d101439.zip
add ability to remove one's avatar for account and channels (#3467)
* add ability to remove one's avatar for account and channels * add ability to remove one's avatar for account and channels * only display avatar edition options after input change
Diffstat (limited to 'client/src/app/core/users/user.service.ts')
-rw-r--r--client/src/app/core/users/user.service.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/app/core/users/user.service.ts b/client/src/app/core/users/user.service.ts
index 2f3945169..99ed3b407 100644
--- a/client/src/app/core/users/user.service.ts
+++ b/client/src/app/core/users/user.service.ts
@@ -123,6 +123,16 @@ export class UserService {
123 .pipe(catchError(err => this.restExtractor.handleError(err))) 123 .pipe(catchError(err => this.restExtractor.handleError(err)))
124 } 124 }
125 125
126 deleteAvatar () {
127 const url = UserService.BASE_USERS_URL + 'me/avatar'
128
129 return this.authHttp.delete(url)
130 .pipe(
131 map(this.restExtractor.extractDataBool),
132 catchError(err => this.restExtractor.handleError(err))
133 )
134 }
135
126 signup (userCreate: UserRegister) { 136 signup (userCreate: UserRegister) {
127 return this.authHttp.post(UserService.BASE_USERS_URL + 'register', userCreate) 137 return this.authHttp.post(UserService.BASE_USERS_URL + 'register', userCreate)
128 .pipe( 138 .pipe(