Skip to content
Snippets Groups Projects
Commit e987a50e authored by syuilo's avatar syuilo
Browse files

perf(server): Improve following/followers API performance

Related #6813
parent d7e7848c
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,8 @@ export default define(meta, async (ps, me) => {
}
const query = makePaginationQuery(Followings.createQueryBuilder('following'), ps.sinceId, ps.untilId)
.andWhere(`following.followeeId = :userId`, { userId: user.id });
.andWhere(`following.followeeId = :userId`, { userId: user.id })
.innerJoinAndSelect('following.follower', 'follower');
const followings = await query
.take(ps.limit!)
......
......@@ -76,7 +76,8 @@ export default define(meta, async (ps, me) => {
}
const query = makePaginationQuery(Followings.createQueryBuilder('following'), ps.sinceId, ps.untilId)
.andWhere(`following.followerId = :userId`, { userId: user.id });
.andWhere(`following.followerId = :userId`, { userId: user.id })
.innerJoinAndSelect('following.followee', 'followee');
const followings = await query
.take(ps.limit!)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment