From 78ae2eb6281f508485adbe88bb385e7d37db81e8 Mon Sep 17 00:00:00 2001 From: do-huni Date: Tue, 16 Jul 2024 16:46:51 +0900 Subject: [PATCH] fix(articlesRead): synchronized swagger --- src/APIs/articles/controllers/articles-read.controller.ts | 6 ++++-- src/APIs/articles/repositories/articles-read.repository.ts | 2 +- src/APIs/articles/services/articles-read.service.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/APIs/articles/controllers/articles-read.controller.ts b/src/APIs/articles/controllers/articles-read.controller.ts index dffbcd8..364bd1e 100644 --- a/src/APIs/articles/controllers/articles-read.controller.ts +++ b/src/APIs/articles/controllers/articles-read.controller.ts @@ -39,10 +39,12 @@ export class ArticlesReadController { description: '로그인된 유저의 임시작성 게시글을 조회한다.', }) @ApiCookieAuth() - @ApiOkResponse({ type: [ArticleDto] }) + @ApiOkResponse({ type: [ArticleDetailResponseDto] }) @UseGuards(AuthGuardV2) @Get('temp') - async fetchTempArticles(@Req() req: Request): Promise { + async fetchTempArticles( + @Req() req: Request, + ): Promise { const userId = req.user.userId; return await this.svc_articlesRead.readTempArticles({ userId }); } diff --git a/src/APIs/articles/repositories/articles-read.repository.ts b/src/APIs/articles/repositories/articles-read.repository.ts index 69fccba..33171cf 100644 --- a/src/APIs/articles/repositories/articles-read.repository.ts +++ b/src/APIs/articles/repositories/articles-read.repository.ts @@ -47,7 +47,7 @@ export class ArticlesReadRepository extends Repository
{ .getOne(); } - async readTemp({ userId }): Promise { + async readTemp({ userId }): Promise { return this.createQueryBuilder('p') .innerJoin('p.user', 'user') .leftJoinAndSelect('p.articleBackground', 'article_background') diff --git a/src/APIs/articles/services/articles-read.service.ts b/src/APIs/articles/services/articles-read.service.ts index c605cbb..3bfc1f1 100644 --- a/src/APIs/articles/services/articles-read.service.ts +++ b/src/APIs/articles/services/articles-read.service.ts @@ -46,7 +46,7 @@ export class ArticlesReadService { return { article, stickerBlocks }; } - async readTempArticles({ userId }): Promise { + async readTempArticles({ userId }): Promise { return await this.repo_articlesRead.readTemp({ userId }); }