From e89c0135bdb12f90ea7ebbc9c61621db47b6d4a6 Mon Sep 17 00:00:00 2001 From: Puniko Date: Mon, 26 Dec 2022 09:09:11 +0100 Subject: [PATCH] removing joins to avatar and banners in children endpoint --- packages/backend/src/server/api/endpoints/notes/children.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts index 55ef39541..091bab766 100644 --- a/packages/backend/src/server/api/endpoints/notes/children.ts +++ b/packages/backend/src/server/api/endpoints/notes/children.ts @@ -56,9 +56,7 @@ export const paramDef = { export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId) .andWhere('note.id IN (SELECT id FROM note_replies(:noteId, :depth, :limit))', { noteId: ps.noteId, depth: ps.depth, limit: ps.limit }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('user.avatar', 'avatar') - .leftJoinAndSelect('user.banner', 'banner'); + .innerJoinAndSelect('note.user', 'user'); generateVisibilityQuery(query, user); if (user) {