diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:25:58 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:25:58 +0200 |
commit | bbd5aa7ead5f1554a0872963f957effc26d8c630 (patch) | |
tree | a32cad420cfabe4eab5df4e3f104fa34f734fa7d /shared/server-commands/users | |
parent | a85d530384761a0af833caac9b38b9834517c9fa (diff) | |
download | PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.tar.gz PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.tar.zst PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.zip |
Reimplement a typed omit function
Diffstat (limited to 'shared/server-commands/users')
-rw-r--r-- | shared/server-commands/users/users-command.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/shared/server-commands/users/users-command.ts b/shared/server-commands/users/users-command.ts index b5ae9008e..d8303848d 100644 --- a/shared/server-commands/users/users-command.ts +++ b/shared/server-commands/users/users-command.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { omit } from 'lodash' | 1 | import { omit, pick } from '@shared/core-utils' |
2 | import { pick } from '@shared/core-utils' | ||
3 | import { | 2 | import { |
4 | HttpStatusCode, | 3 | HttpStatusCode, |
5 | MyUser, | 4 | MyUser, |
@@ -298,7 +297,7 @@ export class UsersCommand extends AbstractCommand { | |||
298 | updateMe (options: OverrideCommandOptions & UserUpdateMe) { | 297 | updateMe (options: OverrideCommandOptions & UserUpdateMe) { |
299 | const path = '/api/v1/users/me' | 298 | const path = '/api/v1/users/me' |
300 | 299 | ||
301 | const toSend: UserUpdateMe = omit(options, 'url', 'accessToken') | 300 | const toSend: UserUpdateMe = omit(options, [ 'expectedStatus', 'token' ]) |
302 | 301 | ||
303 | return this.putBodyRequest({ | 302 | return this.putBodyRequest({ |
304 | ...options, | 303 | ...options, |