Skip to content

Commit

Permalink
feat: get categories orderby createdAt
Browse files Browse the repository at this point in the history
  • Loading branch information
stae1102 committed Mar 10, 2024
1 parent 551ae3b commit bb55a88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/users/repository/user.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class UserRepository extends Repository<User> {
return await this.createQueryBuilder('user')
.leftJoinAndSelect('user.categories', 'categories')
.where('user.id = :id', { id })
.orderBy('categories.createdAt', 'DESC')
.getOneOrFail();
}

Expand Down

0 comments on commit bb55a88

Please sign in to comment.