From 0a061a8d8561509c2766e9dc50214bf62347798b Mon Sep 17 00:00:00 2001 From: blaxsior Date: Tue, 28 Nov 2023 14:11:25 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=82=A4=EC=9B=8C=EB=93=9C=20=EB=B3=84?= =?UTF-8?q?=20=EA=B0=90=EC=A0=95=20=EB=8C=80=EB=B6=84=EB=A5=98=20=EA=B0=AF?= =?UTF-8?q?=EC=88=98=20=EC=A0=95=EB=B3=B4=20=EB=B0=98=ED=99=98=ED=95=98?= =?UTF-8?q?=EB=8A=94=20api=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/server/src/app.module.ts | 15 ++++++--------- .../daily-keyword-big-emotions-cnt.controller.ts | 6 ++++-- .../dtos/get-dkbe-counts.dto.ts | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/backend/server/src/app.module.ts b/backend/server/src/app.module.ts index ebae1ba..fdc15f7 100644 --- a/backend/server/src/app.module.ts +++ b/backend/server/src/app.module.ts @@ -5,19 +5,17 @@ import { TypeOrmModule } from '@nestjs/typeorm'; import { configOption } from './util/options/config.option'; import { typeormAsyncOptions } from './util/options/typeorm.option'; +import { AuthModule } from './auth/auth.module'; import { AnalysisCommentModule } from './analysis-comment/analysis-comment.module'; +import { BatchModule } from './batch/batch.module'; +import { DailyKeywordBigEmotionsCntModule } from './daily-keyword-big-emotions-cnt/daily-keyword-big-emotions-cnt.module'; import { KeywordModule } from './keyword/keyword.module'; import { NewsSourceModule } from './news-source/news-source.module'; -import { AuthModule } from './auth/auth.module'; - -import { TokenModule } from './token/token.module'; import { RedisModule } from './redis/redis.module'; import { SearchModule } from './search/search.module'; -import { BatchModule } from './batch/batch.module'; +import { TokenModule } from './token/token.module'; + import { AppController } from './app.controller'; -import { DailyKeywordBigEmotionsCntController } from './daily-keyword-big-emotions-cnt/daily-keyword-big-emotions-cnt.controller'; -import { DailyKeywordBigEmotionsCntService } from './daily-keyword-big-emotions-cnt/daily-keyword-big-emotions-cnt.service'; -import { DailyKeywordBigEmotionsCntModule } from './daily-keyword-big-emotions-cnt/daily-keyword-big-emotions-cnt.module'; @Module({ imports: [ @@ -33,7 +31,6 @@ import { DailyKeywordBigEmotionsCntModule } from './daily-keyword-big-emotions-c BatchModule, DailyKeywordBigEmotionsCntModule, ], - controllers: [AppController, DailyKeywordBigEmotionsCntController], - providers: [DailyKeywordBigEmotionsCntService], + controllers: [AppController], }) export class AppModule {} diff --git a/backend/server/src/daily-keyword-big-emotions-cnt/daily-keyword-big-emotions-cnt.controller.ts b/backend/server/src/daily-keyword-big-emotions-cnt/daily-keyword-big-emotions-cnt.controller.ts index e4b09fe..b939e4f 100644 --- a/backend/server/src/daily-keyword-big-emotions-cnt/daily-keyword-big-emotions-cnt.controller.ts +++ b/backend/server/src/daily-keyword-big-emotions-cnt/daily-keyword-big-emotions-cnt.controller.ts @@ -1,7 +1,9 @@ -import { Body, Controller, Get } from '@nestjs/common'; +import { ApiTags } from '@nestjs/swagger'; +import { Query, Controller, Get } from '@nestjs/common'; import { DailyKeywordBigEmotionsCntService } from './daily-keyword-big-emotions-cnt.service'; import { GetdkbeCountReqDto } from './dtos/get-dkbe-counts.dto'; +@ApiTags('Daily Keyword Big Emotions Count') @Controller('daily-keyword-big-emotions-cnt') export class DailyKeywordBigEmotionsCntController { constructor(private service: DailyKeywordBigEmotionsCntService) {} @@ -10,7 +12,7 @@ export class DailyKeywordBigEmotionsCntController { * 키워드에 대해 날짜 별로 저장된 감정 대분류에 대한 댓글 개수 정보들을 가져온다. */ @Get('/') - async getdkbeCounts(@Body() dto: GetdkbeCountReqDto) { + async getdkbeCounts(@Query() dto: GetdkbeCountReqDto) { const { keyword_id, from, to } = dto; const result = await this.service.getdkbmCounts(keyword_id, from, to); diff --git a/backend/server/src/daily-keyword-big-emotions-cnt/dtos/get-dkbe-counts.dto.ts b/backend/server/src/daily-keyword-big-emotions-cnt/dtos/get-dkbe-counts.dto.ts index 75306c7..b70467d 100644 --- a/backend/server/src/daily-keyword-big-emotions-cnt/dtos/get-dkbe-counts.dto.ts +++ b/backend/server/src/daily-keyword-big-emotions-cnt/dtos/get-dkbe-counts.dto.ts @@ -10,7 +10,7 @@ export class GetdkbeCountReqDto { /** * 개수 정보를 가져오는 시작일 - * @example: '2020-01-01' + * @example '2020-01-01' */ @IsDate() from: Date;