aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/follows-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/server/follows-command.ts')
-rw-r--r--shared/extra-utils/server/follows-command.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/shared/extra-utils/server/follows-command.ts b/shared/extra-utils/server/follows-command.ts
index 2b889cf66..01ef6f179 100644
--- a/shared/extra-utils/server/follows-command.ts
+++ b/shared/extra-utils/server/follows-command.ts
@@ -1,4 +1,4 @@
1import { pick } from 'lodash' 1import { pick } from '@shared/core-utils'
2import { ActivityPubActorType, ActorFollow, FollowState, HttpStatusCode, ResultList, ServerFollowCreate } from '@shared/models' 2import { ActivityPubActorType, ActorFollow, FollowState, HttpStatusCode, ResultList, ServerFollowCreate } from '@shared/models'
3import { AbstractCommand, OverrideCommandOptions } from '../shared' 3import { AbstractCommand, OverrideCommandOptions } from '../shared'
4import { PeerTubeServer } from './server' 4import { PeerTubeServer } from './server'
@@ -15,8 +15,7 @@ export class FollowsCommand extends AbstractCommand {
15 }) { 15 }) {
16 const path = '/api/v1/server/followers' 16 const path = '/api/v1/server/followers'
17 17
18 const toPick = [ 'start', 'count', 'sort', 'search', 'state', 'actorType' ] 18 const query = pick(options, [ 'start', 'count', 'sort', 'search', 'state', 'actorType' ])
19 const query = pick(options, toPick)
20 19
21 return this.getRequestBody<ResultList<ActorFollow>>({ 20 return this.getRequestBody<ResultList<ActorFollow>>({
22 ...options, 21 ...options,
@@ -38,8 +37,7 @@ export class FollowsCommand extends AbstractCommand {
38 } = {}) { 37 } = {}) {
39 const path = '/api/v1/server/following' 38 const path = '/api/v1/server/following'
40 39
41 const toPick = [ 'start', 'count', 'sort', 'search', 'state', 'actorType' ] 40 const query = pick(options, [ 'start', 'count', 'sort', 'search', 'state', 'actorType' ])
42 const query = pick(options, toPick)
43 41
44 return this.getRequestBody<ResultList<ActorFollow>>({ 42 return this.getRequestBody<ResultList<ActorFollow>>({
45 ...options, 43 ...options,