diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-21 18:23:10 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | e71bcc0f4b31ecfd84a786411febfc6d18a85258 (patch) | |
tree | ea31776b6bc69bd3b72e6c6f615cf94072271c82 /server/controllers/activitypub/client.ts | |
parent | b1cbc0dd3ee0fce6d8390b6d3996386a5b6097ac (diff) | |
download | PeerTube-e71bcc0f4b31ecfd84a786411febfc6d18a85258.tar.gz PeerTube-e71bcc0f4b31ecfd84a786411febfc6d18a85258.tar.zst PeerTube-e71bcc0f4b31ecfd84a786411febfc6d18a85258.zip |
Add outbox
Diffstat (limited to 'server/controllers/activitypub/client.ts')
-rw-r--r-- | server/controllers/activitypub/client.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 7b3921770..24c8665a5 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -6,7 +6,7 @@ import { executeIfActivityPub, localAccountValidator } from '../../middlewares' | |||
6 | import { pageToStartAndCount } from '../../helpers' | 6 | import { pageToStartAndCount } from '../../helpers' |
7 | import { AccountInstance, VideoChannelInstance } from '../../models' | 7 | import { AccountInstance, VideoChannelInstance } from '../../models' |
8 | import { activityPubCollectionPagination } from '../../helpers/activitypub' | 8 | import { activityPubCollectionPagination } from '../../helpers/activitypub' |
9 | import { ACTIVITY_PUB } from '../../initializers/constants' | 9 | import { ACTIVITY_PUB, CONFIG } from '../../initializers/constants' |
10 | import { asyncMiddleware } from '../../middlewares/async' | 10 | import { asyncMiddleware } from '../../middlewares/async' |
11 | import { videosGetValidator } from '../../middlewares/validators/videos' | 11 | import { videosGetValidator } from '../../middlewares/validators/videos' |
12 | import { VideoInstance } from '../../models/video/video-interface' | 12 | import { VideoInstance } from '../../models/video/video-interface' |
@@ -60,7 +60,7 @@ async function accountFollowersController (req: express.Request, res: express.Re | |||
60 | const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE) | 60 | const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE) |
61 | 61 | ||
62 | const result = await db.AccountFollow.listAcceptedFollowerUrlsForApi([ account.id ], start, count) | 62 | const result = await db.AccountFollow.listAcceptedFollowerUrlsForApi([ account.id ], start, count) |
63 | const activityPubResult = activityPubCollectionPagination(req.url, page, result) | 63 | const activityPubResult = activityPubCollectionPagination(CONFIG.WEBSERVER.URL + req.url, page, result) |
64 | 64 | ||
65 | return res.json(activityPubResult) | 65 | return res.json(activityPubResult) |
66 | } | 66 | } |
@@ -72,7 +72,7 @@ async function accountFollowingController (req: express.Request, res: express.Re | |||
72 | const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE) | 72 | const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE) |
73 | 73 | ||
74 | const result = await db.AccountFollow.listAcceptedFollowingUrlsForApi([ account.id ], start, count) | 74 | const result = await db.AccountFollow.listAcceptedFollowingUrlsForApi([ account.id ], start, count) |
75 | const activityPubResult = activityPubCollectionPagination(req.url, page, result) | 75 | const activityPubResult = activityPubCollectionPagination(CONFIG.WEBSERVER.URL + req.url, page, result) |
76 | 76 | ||
77 | return res.json(activityPubResult) | 77 | return res.json(activityPubResult) |
78 | } | 78 | } |