diff --git a/src/users/repository/user.repository.ts b/src/users/repository/user.repository.ts index 9ece2ef..c2a508d 100644 --- a/src/users/repository/user.repository.ts +++ b/src/users/repository/user.repository.ts @@ -27,6 +27,7 @@ export class UserRepository extends Repository { return await this.createQueryBuilder('user') .leftJoinAndSelect('user.categories', 'categories') .where('user.id = :id', { id }) + .orderBy('categories.createdAt', 'DESC') .getOneOrFail(); }