From b475ea415d15e0f6f226e18c1f9671e828697779 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 9 Aug 2022 00:53:57 -0700 Subject: [PATCH] I doubt itll work, but... --- .../src/server/api/endpoints/notes/recommended-timeline.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts index 3aa10d1829..18cf4944e5 100644 --- a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts @@ -1,6 +1,6 @@ import { Brackets } from 'typeorm'; import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Notes, Users } from '@/models/index.js'; +import { Notes } from '@/models/index.js'; import { activeUsersChart } from '@/services/chart/index.js'; import define from '../../define.js'; import { ApiError } from '../../error.js'; @@ -64,12 +64,11 @@ export default define(meta, paramDef, async (ps, user) => { throw new ApiError(meta.errors.rtlDisabled); } } - console.log(`\n\n${m.recommendedInstances}\n\n`) //#region Construct query const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) - .andWhere('(note.userHost IN (:instances)) OR (note.userHost IS NULL)', { instances: m.recommendedInstances }) + .andWhere('(note.userHost IN (:instances)) OR (note.userHost IS NULL)', { instances: m.recommendedInstances.toString().split(',') }) // .andWhere(new Brackets(qb => { // qb.where('note.userHost IN :instances', { instances: m.recommendedInstances }) // .orWhere('note.userHost IS NULL');