aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-05 10:29:35 +0200
committerChocobozzz <me@florianbigard.com>2022-05-05 10:29:35 +0200
commitbae616273d455d225d131eb17c56db6c20a0b6b3 (patch)
treeed2174122d092320cea34c4ae522da6f2131f968 /server/controllers
parentd493e2d4bf0ace177d15e9173d1c02df8c100558 (diff)
downloadPeerTube-bae616273d455d225d131eb17c56db6c20a0b6b3.tar.gz
PeerTube-bae616273d455d225d131eb17c56db6c20a0b6b3.tar.zst
PeerTube-bae616273d455d225d131eb17c56db6c20a0b6b3.zip
Convert followers/following in raw SQL queries
Prevent weird bug in SQL generation
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/server/follows.ts4
1 files changed, 2 insertions, 2 deletions
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 {
99async function listFollowing (req: express.Request, res: express.Response) { 99async function listFollowing (req: express.Request, res: express.Response) {
100 const serverActor = await getServerActor() 100 const serverActor = await getServerActor()
101 const resultList = await ActorFollowModel.listInstanceFollowingForApi({ 101 const resultList = await ActorFollowModel.listInstanceFollowingForApi({
102 id: serverActor.id, 102 followerId: serverActor.id,
103 start: req.query.start, 103 start: req.query.start,
104 count: req.query.count, 104 count: req.query.count,
105 sort: req.query.sort, 105 sort: req.query.sort,
@@ -159,7 +159,7 @@ async function removeFollowing (req: express.Request, res: express.Response) {
159 const follow = res.locals.follow 159 const follow = res.locals.follow
160 160
161 await sequelizeTypescript.transaction(async t => { 161 await sequelizeTypescript.transaction(async t => {
162 if (follow.state === 'accepted') await sendUndoFollow(follow, t) 162 if (follow.state === 'accepted') sendUndoFollow(follow, t)
163 163
164 // Disable redundancy on unfollowed instances 164 // Disable redundancy on unfollowed instances
165 const server = follow.ActorFollowing.Server 165 const server = follow.ActorFollowing.Server