1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Convert followers/following in raw SQL queries

Prevent weird bug in SQL generation
This commit is contained in:
Chocobozzz 2022-05-05 10:29:35 +02:00
parent d493e2d4bf
commit bae616273d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
11 changed files with 338 additions and 145 deletions

View file

@ -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