From 56e7d7e0b16be930fe0aaac67c00216e9b998b3d Mon Sep 17 00:00:00 2001 From: Hazel K Date: Tue, 8 Oct 2024 23:45:51 -0400 Subject: [PATCH] remove un-necessary assignment to query --- .../backend/src/server/api/endpoints/notes/following.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/following.ts b/packages/backend/src/server/api/endpoints/notes/following.ts index 1d9ce9704e..56e0fcd03c 100644 --- a/packages/backend/src/server/api/endpoints/notes/following.ts +++ b/packages/backend/src/server/api/endpoints/notes/following.ts @@ -52,7 +52,7 @@ export default class extends Endpoint { // eslint- private queryService: QueryService, ) { super(meta, paramDef, async (ps, me) => { - let query = this.notesRepository + const query = this.notesRepository .createQueryBuilder('note') .setParameter('me', me.id) @@ -73,8 +73,7 @@ export default class extends Endpoint { // eslint- // Limit to mutuals, if requested if (ps.mutualsOnly) { - query = query - .innerJoin(MiFollowing, 'mutuals', 'latest.user_id = mutuals."followerId" AND mutuals."followeeId" = :me'); + query.innerJoin(MiFollowing, 'mutuals', 'latest.user_id = mutuals."followerId" AND mutuals."followeeId" = :me'); } // Respect blocks and mutes @@ -82,7 +81,7 @@ export default class extends Endpoint { // eslint- this.queryService.generateMutedUserQuery(query, me); // Support pagination - query = this.queryService + this.queryService .makePaginationQuery(query, ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) .orderBy('note.id', 'DESC') .take(ps.limit);