Skip to content

Commit

Permalink
fix: bring contents by most recent
Browse files Browse the repository at this point in the history
  • Loading branch information
stae1102 committed Feb 12, 2024
1 parent 20838e0 commit 8203b6c
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 8203b6c

Please sign in to comment.