diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-26 10:03:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-26 10:03:40 +0200 |
commit | ed56ad1193bb5bb0a81fb843a11eb90d3fed9861 (patch) | |
tree | 64842447b4721978c69e1d2b3a964951c789c408 /server/tests/utils/users | |
parent | d62cf3234ccfca0223a9639782635f0fb6594f8c (diff) | |
download | PeerTube-ed56ad1193bb5bb0a81fb843a11eb90d3fed9861.tar.gz PeerTube-ed56ad1193bb5bb0a81fb843a11eb90d3fed9861.tar.zst PeerTube-ed56ad1193bb5bb0a81fb843a11eb90d3fed9861.zip |
Add ability to update the user display name/description
Diffstat (limited to 'server/tests/utils/users')
-rw-r--r-- | server/tests/utils/users/users.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/tests/utils/users/users.ts b/server/tests/utils/users/users.ts index fc6b26c50..d31e57a25 100644 --- a/server/tests/utils/users/users.ts +++ b/server/tests/utils/users/users.ts | |||
@@ -132,6 +132,7 @@ function updateMyUser (options: { | |||
132 | nsfwPolicy?: NSFWPolicyType, | 132 | nsfwPolicy?: NSFWPolicyType, |
133 | email?: string, | 133 | email?: string, |
134 | autoPlayVideo?: boolean | 134 | autoPlayVideo?: boolean |
135 | displayName?: string, | ||
135 | description?: string | 136 | description?: string |
136 | }) { | 137 | }) { |
137 | const path = '/api/v1/users/me' | 138 | const path = '/api/v1/users/me' |
@@ -142,6 +143,7 @@ function updateMyUser (options: { | |||
142 | if (options.autoPlayVideo !== undefined && options.autoPlayVideo !== null) toSend['autoPlayVideo'] = options.autoPlayVideo | 143 | if (options.autoPlayVideo !== undefined && options.autoPlayVideo !== null) toSend['autoPlayVideo'] = options.autoPlayVideo |
143 | if (options.email !== undefined && options.email !== null) toSend['email'] = options.email | 144 | if (options.email !== undefined && options.email !== null) toSend['email'] = options.email |
144 | if (options.description !== undefined && options.description !== null) toSend['description'] = options.description | 145 | if (options.description !== undefined && options.description !== null) toSend['description'] = options.description |
146 | if (options.displayName !== undefined && options.displayName !== null) toSend['displayName'] = options.displayName | ||
145 | 147 | ||
146 | return makePutBodyRequest({ | 148 | return makePutBodyRequest({ |
147 | url: options.url, | 149 | url: options.url, |