aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/follows-command.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /shared/extra-utils/server/follows-command.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'shared/extra-utils/server/follows-command.ts')
-rw-r--r--shared/extra-utils/server/follows-command.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/extra-utils/server/follows-command.ts b/shared/extra-utils/server/follows-command.ts
index 4e1e56d7a..4e9ed9494 100644
--- a/shared/extra-utils/server/follows-command.ts
+++ b/shared/extra-utils/server/follows-command.ts
@@ -2,7 +2,7 @@ import { pick } from 'lodash'
2import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/models' 2import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/models'
3import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' 3import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
4import { AbstractCommand, OverrideCommandOptions } from '../shared' 4import { AbstractCommand, OverrideCommandOptions } from '../shared'
5import { ServerInfo } from './servers' 5import { PeerTubeServer } from './server'
6 6
7export class FollowsCommand extends AbstractCommand { 7export class FollowsCommand extends AbstractCommand {
8 8
@@ -70,7 +70,7 @@ export class FollowsCommand extends AbstractCommand {
70 } 70 }
71 71
72 async unfollow (options: OverrideCommandOptions & { 72 async unfollow (options: OverrideCommandOptions & {
73 target: ServerInfo 73 target: PeerTubeServer
74 }) { 74 }) {
75 const path = '/api/v1/server/following/' + options.target.host 75 const path = '/api/v1/server/following/' + options.target.host
76 76
@@ -112,7 +112,7 @@ export class FollowsCommand extends AbstractCommand {
112 } 112 }
113 113
114 removeFollower (options: OverrideCommandOptions & { 114 removeFollower (options: OverrideCommandOptions & {
115 follower: ServerInfo 115 follower: PeerTubeServer
116 }) { 116 }) {
117 const path = '/api/v1/server/followers/peertube@' + options.follower.host 117 const path = '/api/v1/server/followers/peertube@' + options.follower.host
118 118