Skip to content

Commit

Permalink
Merge branch 'develop' into enh-11915
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih authored Nov 26, 2023
2 parents 54adab2 + d32631d commit fa0c181
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/backend/src/server/api/endpoints/notes/featured.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
}

if (noteIds.length === 0) {
return [];
}

noteIds.sort((a, b) => a > b ? -1 : 1);
if (ps.untilId) {
noteIds = noteIds.filter(id => id < ps.untilId!);
}
noteIds = noteIds.slice(0, ps.limit);

if (noteIds.length === 0) {
return [];
}

const query = this.notesRepository.createQueryBuilder('note')
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
.innerJoinAndSelect('note.user', 'user')
Expand Down

0 comments on commit fa0c181

Please sign in to comment.