debug log

This commit is contained in:
ThatOneCalculator 2022-08-09 00:50:11 -07:00
parent cc7ddc840d
commit 7fd1f05bb3
1 changed files with 1 additions and 2 deletions

View File

@ -64,12 +64,11 @@ export default define(meta, paramDef, async (ps, user) => {
throw new ApiError(meta.errors.rtlDisabled); throw new ApiError(meta.errors.rtlDisabled);
} }
} }
console.log(`\n\n${m.recommendedInstances}\n\n`)
// .andWhere('(note.userHost IN (:instances)) OR (note.userHost IS NULL)', { instances: instances })
//#region Construct query //#region Construct query
const query = makePaginationQuery(Notes.createQueryBuilder('note'), const query = makePaginationQuery(Notes.createQueryBuilder('note'),
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
// Query where note.userHost is in recommended instances
.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 })
// .andWhere(new Brackets(qb => { // .andWhere(new Brackets(qb => {
// qb.where('note.userHost IN :instances', { instances: m.recommendedInstances }) // qb.where('note.userHost IN :instances', { instances: m.recommendedInstances })