From b637a339304d603257659171a87ab407c6a2356b Mon Sep 17 00:00:00 2001 From: stae1102 Date: Sun, 27 Jul 2025 11:53:31 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=88=9C=EC=84=9C=EB=A5=BC=20=EC=B5=9C?= =?UTF-8?q?=EC=8B=A0=EC=88=9C=EC=9C=BC=EB=A1=9C=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/categories/category.repository.ts | 3 +++ src/categories/category.service.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/categories/category.repository.ts b/src/categories/category.repository.ts index 23988b0..b715f8d 100644 --- a/src/categories/category.repository.ts +++ b/src/categories/category.repository.ts @@ -133,6 +133,9 @@ export class CategoryRepository extends Repository { user: { id: userId }, }, relations: ['contents'], + order: { + createdAt: 'desc', + }, }); } diff --git a/src/categories/category.service.ts b/src/categories/category.service.ts index 2231b57..9eb0932 100644 --- a/src/categories/category.service.ts +++ b/src/categories/category.service.ts @@ -1,23 +1,23 @@ import { - Injectable, - NotFoundException, ConflictException, - InternalServerErrorException, Inject, + Injectable, + InternalServerErrorException, + NotFoundException, } from '@nestjs/common'; import { EntityManager } from 'typeorm'; import { AddCategoryBodyDto, AddCategoryOutput, - UpdateCategoryBodyDto, - UpdateCategoryOutput, DeleteCategoryOutput, RecentCategoryList, RecentCategoryListWithSaveCount, + UpdateCategoryBodyDto, + UpdateCategoryOutput, } from './dtos/category.dto'; import { - LoadPersonalCategoriesOutput, LoadFrequentCategoriesOutput, + LoadPersonalCategoriesOutput, } from './dtos/load-personal-categories.dto'; import { Category } from './category.entity'; import { Content } from '../contents/entities/content.entity';