From 51548b31815c6f96f314ae96588a9adca150519d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 15 Nov 2017 10:10:41 +0100 Subject: Add follow tabs Following Follow Followers --- server/controllers/activitypub/client.ts | 4 ++-- server/controllers/activitypub/index.ts | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'server/controllers/activitypub') diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 56a4054fa..49dd24e79 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts @@ -46,7 +46,7 @@ async function accountFollowersController (req: express.Request, res: express.Re const page = req.params.page || 1 const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE) - const result = await db.Account.listAcceptedFollowerUrlsForApi(account.id, start, count) + const result = await db.AccountFollow.listAcceptedFollowerUrlsForApi(account.id, start, count) const activityPubResult = activityPubCollectionPagination(req.url, page, result) return res.json(activityPubResult) @@ -58,7 +58,7 @@ async function accountFollowingController (req: express.Request, res: express.Re const page = req.params.page || 1 const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE) - const result = await db.Account.listAcceptedFollowingUrlsForApi(account.id, start, count) + const result = await db.AccountFollow.listAcceptedFollowingUrlsForApi(account.id, start, count) const activityPubResult = activityPubCollectionPagination(req.url, page, result) return res.json(activityPubResult) diff --git a/server/controllers/activitypub/index.ts b/server/controllers/activitypub/index.ts index 0c8574ef7..c5bec6448 100644 --- a/server/controllers/activitypub/index.ts +++ b/server/controllers/activitypub/index.ts @@ -1,14 +1,11 @@ import * as express from 'express' - -import { badRequest } from '../../helpers' -import { inboxRouter } from './inbox' import { activityPubClientRouter } from './client' +import { inboxRouter } from './inbox' const activityPubRouter = express.Router() activityPubRouter.use('/', inboxRouter) activityPubRouter.use('/', activityPubClientRouter) -activityPubRouter.use('/*', badRequest) // --------------------------------------------------------------------------- -- cgit v1.2.3