mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
parent
0735ca0853
commit
1a4b4348a9
@ -139,9 +139,10 @@ export class SearchService {
|
|||||||
limit: pagination.limit,
|
limit: pagination.limit,
|
||||||
});
|
});
|
||||||
if (res.hits.length === 0) return [];
|
if (res.hits.length === 0) return [];
|
||||||
return await this.notesRepository.findBy({
|
const notes = await this.notesRepository.findBy({
|
||||||
id: In(res.hits.map(x => x.id)),
|
id: In(res.hits.map(x => x.id)),
|
||||||
});
|
});
|
||||||
|
return notes.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||||
} else {
|
} else {
|
||||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), pagination.sinceId, pagination.untilId);
|
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), pagination.sinceId, pagination.untilId);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user