From b0657bfa6e3d501b949bfbd6e6aee376db085ade Mon Sep 17 00:00:00 2001 From: James Moy Date: Thu, 30 Nov 2023 09:56:16 -0500 Subject: [PATCH] Update search-by-tag.ts Fix position of where clause --- .../backend/src/server/api/endpoints/notes/search-by-tag.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index 880ad3cd0a..35a431736d 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -76,12 +76,12 @@ export default class extends Endpoint { // eslint- ) { super(meta, paramDef, async (ps, me) => { const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) + .andWhere('note.visibility = \'public\'') .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.renote', 'renote') .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser') - .andWhere('note.visibility = \'public\''); + .leftJoinAndSelect('renote.user', 'renoteUser'); const meta = await this.metaService.fetch(true);