From 8203b6c69094dfeb9e3c09b2b8eac7443fe19f68 Mon Sep 17 00:00:00 2001 From: stae1102 Date: Mon, 12 Feb 2024 18:09:11 +0900 Subject: [PATCH] fix: bring contents by most recent --- src/contents/repository/content.repository.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/contents/repository/content.repository.ts b/src/contents/repository/content.repository.ts index 8832e31..891e815 100644 --- a/src/contents/repository/content.repository.ts +++ b/src/contents/repository/content.repository.ts @@ -18,6 +18,7 @@ export class ContentRepository extends Repository { return this.createQueryBuilder('content') .where('content.userId = :userId', { userId: id }) .leftJoinAndSelect('content.category', 'category') + .orderBy('content.createdAt', 'DESC') .getMany(); }