Skip to content

Commit

Permalink
Merge pull request #280 from Quickchive/fix/#277-sort-created-desc
Browse files Browse the repository at this point in the history
fix: bring contents by most recent
  • Loading branch information
stae1102 authored Feb 12, 2024
2 parents 20838e0 + 8203b6c commit 3833dc7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/contents/repository/content.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class ContentRepository extends Repository<Content> {
return this.createQueryBuilder('content')
.where('content.userId = :userId', { userId: id })
.leftJoinAndSelect('content.category', 'category')
.orderBy('content.createdAt', 'DESC')
.getMany();
}

Expand Down

0 comments on commit 3833dc7

Please sign in to comment.