Skip to content

Commit

Permalink
Merge pull request #305 from Quickchive/fix/#304-return-catogories
Browse files Browse the repository at this point in the history
feat: get categories orderby createdAt
  • Loading branch information
stae1102 authored Mar 10, 2024
2 parents 551ae3b + bb55a88 commit 4d67d3f
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 4d67d3f

Please sign in to comment.