diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-04-06 21:21:03 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-04-06 21:21:03 +0200 |
commit | af5e743b01f20f24d0c25e786d57f557b21f3a24 (patch) | |
tree | 5186d587135f13f00687f8ed6cd8504cdd35799f /client/src/app/shared/users | |
parent | 92fb909c9b4a92a00b0d0da7629e6fb003de281b (diff) | |
download | PeerTube-af5e743b01f20f24d0c25e786d57f557b21f3a24.tar.gz PeerTube-af5e743b01f20f24d0c25e786d57f557b21f3a24.tar.zst PeerTube-af5e743b01f20f24d0c25e786d57f557b21f3a24.zip |
Client: add ability for user to change nsfw settings
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r-- | client/src/app/shared/users/user.service.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/app/shared/users/user.service.ts b/client/src/app/shared/users/user.service.ts index 865e04d48..0d41b900d 100644 --- a/client/src/app/shared/users/user.service.ts +++ b/client/src/app/shared/users/user.service.ts | |||
@@ -33,4 +33,12 @@ export class UserService { | |||
33 | .map(this.restExtractor.extractDataBool) | 33 | .map(this.restExtractor.extractDataBool) |
34 | .catch((res) => this.restExtractor.handleError(res)); | 34 | .catch((res) => this.restExtractor.handleError(res)); |
35 | } | 35 | } |
36 | |||
37 | updateDetails(details: { displayNSFW: boolean }) { | ||
38 | const url = UserService.BASE_USERS_URL + this.authService.getUser().id; | ||
39 | |||
40 | return this.authHttp.put(url, details) | ||
41 | .map(this.restExtractor.extractDataBool) | ||
42 | .catch((res) => this.restExtractor.handleError(res)); | ||
43 | } | ||
36 | } | 44 | } |