mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-02 20:15:55 +02:00
perf(backend): use limit() instead of take()
This commit is contained in:
@@ -65,7 +65,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
|
||||
let notes = await query
|
||||
.orderBy('note.score', 'DESC')
|
||||
.take(100)
|
||||
.limit(100)
|
||||
.getMany();
|
||||
|
||||
notes.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
||||
|
||||
Reference in New Issue
Block a user