diff options
Diffstat (limited to 'shared/utils/users')
-rw-r--r-- | shared/utils/users/users.ts | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/shared/utils/users/users.ts b/shared/utils/users/users.ts index 554e42c01..61a7e3757 100644 --- a/shared/utils/users/users.ts +++ b/shared/utils/users/users.ts | |||
@@ -162,14 +162,15 @@ function unblockUser (url: string, userId: number | string, accessToken: string, | |||
162 | 162 | ||
163 | function updateMyUser (options: { | 163 | function updateMyUser (options: { |
164 | url: string | 164 | url: string |
165 | accessToken: string, | 165 | accessToken: string |
166 | currentPassword?: string, | 166 | currentPassword?: string |
167 | newPassword?: string, | 167 | newPassword?: string |
168 | nsfwPolicy?: NSFWPolicyType, | 168 | nsfwPolicy?: NSFWPolicyType |
169 | email?: string, | 169 | email?: string |
170 | autoPlayVideo?: boolean | 170 | autoPlayVideo?: boolean |
171 | displayName?: string, | 171 | displayName?: string |
172 | description?: string | 172 | description?: string |
173 | videosHistoryEnabled?: boolean | ||
173 | }) { | 174 | }) { |
174 | const path = '/api/v1/users/me' | 175 | const path = '/api/v1/users/me' |
175 | 176 | ||
@@ -181,6 +182,9 @@ function updateMyUser (options: { | |||
181 | if (options.email !== undefined && options.email !== null) toSend['email'] = options.email | 182 | if (options.email !== undefined && options.email !== null) toSend['email'] = options.email |
182 | if (options.description !== undefined && options.description !== null) toSend['description'] = options.description | 183 | if (options.description !== undefined && options.description !== null) toSend['description'] = options.description |
183 | if (options.displayName !== undefined && options.displayName !== null) toSend['displayName'] = options.displayName | 184 | if (options.displayName !== undefined && options.displayName !== null) toSend['displayName'] = options.displayName |
185 | if (options.videosHistoryEnabled !== undefined && options.videosHistoryEnabled !== null) { | ||
186 | toSend['videosHistoryEnabled'] = options.videosHistoryEnabled | ||
187 | } | ||
184 | 188 | ||
185 | return makePutBodyRequest({ | 189 | return makePutBodyRequest({ |
186 | url: options.url, | 190 | url: options.url, |