fix(server): Use inner join

https://github.com/syuilo/misskey/issues/6813#issuecomment-803400023
This commit is contained in:
syuilo
2021-03-21 10:39:32 +09:00
parent 9bb6dc52b8
commit d7e7848c92
19 changed files with 91 additions and 91 deletions

View File

@@ -23,7 +23,7 @@ export async function injectFeatured(timeline: Note[], user?: User | null) {
.andWhere(`note.score > 0`)
.andWhere(`note.createdAt > :date`, { date: new Date(Date.now() - day) })
.andWhere(`note.visibility = 'public'`)
.leftJoinAndSelect('note.user', 'user');
.innerJoinAndSelect('note.user', 'user');
if (user) {
query.andWhere('note.userId != :userId', { userId: user.id });