aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/users/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-01 15:39:13 +0100
committerChocobozzz <me@florianbigard.com>2021-02-01 15:39:13 +0100
commit6d989edc66e7b541fcf97c2a4a6f91cbf960060a (patch)
tree9c72977cf05eee2b3a84dd1867ec60ef491b0900 /shared/extra-utils/users/users.ts
parentcb5c2abc99c2e222fe18621f79cb68b805678e15 (diff)
downloadPeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.tar.gz
PeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.tar.zst
PeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.zip
Add ability to update plugin auth
Diffstat (limited to 'shared/extra-utils/users/users.ts')
-rw-r--r--shared/extra-utils/users/users.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared/extra-utils/users/users.ts b/shared/extra-utils/users/users.ts
index c683dcdd1..db532dbb0 100644
--- a/shared/extra-utils/users/users.ts
+++ b/shared/extra-utils/users/users.ts
@@ -288,6 +288,7 @@ function updateUser (options: {
288 videoQuotaDaily?: number 288 videoQuotaDaily?: number
289 password?: string 289 password?: string
290 adminFlags?: UserAdminFlag 290 adminFlags?: UserAdminFlag
291 pluginAuth?: string
291 role?: UserRole 292 role?: UserRole
292}) { 293}) {
293 const path = '/api/v1/users/' + options.userId 294 const path = '/api/v1/users/' + options.userId
@@ -300,6 +301,7 @@ function updateUser (options: {
300 if (options.videoQuotaDaily !== undefined && options.videoQuotaDaily !== null) toSend['videoQuotaDaily'] = options.videoQuotaDaily 301 if (options.videoQuotaDaily !== undefined && options.videoQuotaDaily !== null) toSend['videoQuotaDaily'] = options.videoQuotaDaily
301 if (options.role !== undefined && options.role !== null) toSend['role'] = options.role 302 if (options.role !== undefined && options.role !== null) toSend['role'] = options.role
302 if (options.adminFlags !== undefined && options.adminFlags !== null) toSend['adminFlags'] = options.adminFlags 303 if (options.adminFlags !== undefined && options.adminFlags !== null) toSend['adminFlags'] = options.adminFlags
304 if (options.pluginAuth !== undefined) toSend['pluginAuth'] = options.pluginAuth
303 305
304 return makePutBodyRequest({ 306 return makePutBodyRequest({
305 url: options.url, 307 url: options.url,