From bae616273d455d225d131eb17c56db6c20a0b6b3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 5 May 2022 10:29:35 +0200 Subject: Convert followers/following in raw SQL queries Prevent weird bug in SQL generation --- server/controllers/api/server/follows.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/server/follows.ts b/server/controllers/api/server/follows.ts index c613386b2..9557810b5 100644 --- a/server/controllers/api/server/follows.ts +++ b/server/controllers/api/server/follows.ts @@ -99,7 +99,7 @@ export { async function listFollowing (req: express.Request, res: express.Response) { const serverActor = await getServerActor() const resultList = await ActorFollowModel.listInstanceFollowingForApi({ - id: serverActor.id, + followerId: serverActor.id, start: req.query.start, count: req.query.count, sort: req.query.sort, @@ -159,7 +159,7 @@ async function removeFollowing (req: express.Request, res: express.Response) { const follow = res.locals.follow await sequelizeTypescript.transaction(async t => { - if (follow.state === 'accepted') await sendUndoFollow(follow, t) + if (follow.state === 'accepted') sendUndoFollow(follow, t) // Disable redundancy on unfollowed instances const server = follow.ActorFollowing.Server -- cgit v1.2.3