Skip to content

Commit

Permalink
fix(articlesRead): synchronized swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
astorverse committed Jul 16, 2024
1 parent 7c4bf9c commit 78ae2eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/APIs/articles/controllers/articles-read.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ArticleDto[]> {
async fetchTempArticles(
@Req() req: Request,
): Promise<ArticleDetailResponseDto[]> {
const userId = req.user.userId;
return await this.svc_articlesRead.readTempArticles({ userId });
}
Expand Down
2 changes: 1 addition & 1 deletion src/APIs/articles/repositories/articles-read.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class ArticlesReadRepository extends Repository<Article> {
.getOne();
}

async readTemp({ userId }): Promise<ArticleDto[]> {
async readTemp({ userId }): Promise<ArticleDetailResponseDto[]> {
return this.createQueryBuilder('p')
.innerJoin('p.user', 'user')
.leftJoinAndSelect('p.articleBackground', 'article_background')
Expand Down
2 changes: 1 addition & 1 deletion src/APIs/articles/services/articles-read.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class ArticlesReadService {
return { article, stickerBlocks };
}

async readTempArticles({ userId }): Promise<ArticleDto[]> {
async readTempArticles({ userId }): Promise<ArticleDetailResponseDto[]> {
return await this.repo_articlesRead.readTemp({ userId });
}

Expand Down

0 comments on commit 78ae2eb

Please sign in to comment.