Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
[Refactor] 메이트 탐색 검색 결과 최신순 정렬
Browse files Browse the repository at this point in the history
  • Loading branch information
JangYouJung committed Feb 16, 2024
1 parent 7eaa655 commit f4f8833
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/search/search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ export class SearchService{
});

const resultCovers = [];

// 검색 결과 최신 순으로 정렬
resultSignatures.sort((a, b) => b.created.getTime() - a.created.getTime());

for(const signature of resultSignatures){
const signatureCover = await this.getSignatureCover(signature);
if(signatureCover) resultCovers.push(signatureCover);
Expand Down

0 comments on commit f4f8833

Please sign in to comment.