im stuff
This commit is contained in:
parent
b376d3e98e
commit
26e82b73dc
1 changed files with 3 additions and 2 deletions
|
@ -65,6 +65,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// .andWhere('(note.userHost IN (:instances)) OR (note.userHost IS NULL)', { instances: instances })
|
||||||
//#region Construct query
|
//#region Construct query
|
||||||
const recommendedQuery = Metas.createQueryBuilder('meta')
|
const recommendedQuery = Metas.createQueryBuilder('meta')
|
||||||
.select('meta.recommendedInstances')
|
.select('meta.recommendedInstances')
|
||||||
|
@ -73,8 +74,8 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
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)
|
||||||
.andWhere(new Brackets(qb => {
|
.andWhere(new Brackets(qb => {
|
||||||
qb.where(`((note.userHost IN (${ recommendedQuery.getQuery() }))`);
|
qb.where(`note.userHost IN (${recommendedQuery.getQuery()})`)
|
||||||
// .orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)');
|
.orWhere('note.userHost IS NULL');
|
||||||
}))
|
}))
|
||||||
.andWhere('(note.visibility = \'public\')')
|
.andWhere('(note.visibility = \'public\')')
|
||||||
.innerJoinAndSelect('note.user', 'user')
|
.innerJoinAndSelect('note.user', 'user')
|
||||||
|
|
Loading…
Reference in a new issue