diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-20 14:15:15 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-21 13:35:31 +0200 |
commit | 4d029ef8ec3d5274eeaa3ee6d808eb7035e7faef (patch) | |
tree | 20bcdd660ab4eb731814db3a4a40fffb48ce7482 /shared/extra-utils/videos/videos-command.ts | |
parent | 7f28f2ddbaeecf451d501e99ded0408c14a33600 (diff) | |
download | PeerTube-4d029ef8ec3d5274eeaa3ee6d808eb7035e7faef.tar.gz PeerTube-4d029ef8ec3d5274eeaa3ee6d808eb7035e7faef.tar.zst PeerTube-4d029ef8ec3d5274eeaa3ee6d808eb7035e7faef.zip |
Add ability for instances to follow any actor
Diffstat (limited to 'shared/extra-utils/videos/videos-command.ts')
-rw-r--r-- | shared/extra-utils/videos/videos-command.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/shared/extra-utils/videos/videos-command.ts b/shared/extra-utils/videos/videos-command.ts index 40cc4dc28..98465e8f6 100644 --- a/shared/extra-utils/videos/videos-command.ts +++ b/shared/extra-utils/videos/videos-command.ts | |||
@@ -267,6 +267,16 @@ export class VideosCommand extends AbstractCommand { | |||
267 | 267 | ||
268 | // --------------------------------------------------------------------------- | 268 | // --------------------------------------------------------------------------- |
269 | 269 | ||
270 | async find (options: OverrideCommandOptions & { | ||
271 | name: string | ||
272 | }) { | ||
273 | const { data } = await this.list(options) | ||
274 | |||
275 | return data.find(v => v.name === options.name) | ||
276 | } | ||
277 | |||
278 | // --------------------------------------------------------------------------- | ||
279 | |||
270 | update (options: OverrideCommandOptions & { | 280 | update (options: OverrideCommandOptions & { |
271 | id: number | string | 281 | id: number | string |
272 | attributes?: VideoEdit | 282 | attributes?: VideoEdit |