fix(server): Use inner join

This commit is contained in:
syuilo
2021-03-21 12:33:37 +09:00
parent c52b504140
commit 70b129cc42
18 changed files with 18 additions and 18 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 });