Skip to content

Commit

Permalink
feat: 키워드 별 감정 대분류 갯수 정보 반환하는 api 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
blaxsior committed Nov 28, 2023
1 parent cb8cbc7 commit 0a061a8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
15 changes: 6 additions & 9 deletions backend/server/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -33,7 +31,6 @@ import { DailyKeywordBigEmotionsCntModule } from './daily-keyword-big-emotions-c
BatchModule,
DailyKeywordBigEmotionsCntModule,
],
controllers: [AppController, DailyKeywordBigEmotionsCntController],
providers: [DailyKeywordBigEmotionsCntService],
controllers: [AppController],
})
export class AppModule {}
Original file line number Diff line number Diff line change
@@ -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) {}
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class GetdkbeCountReqDto {

/**
* 개수 정보를 가져오는 시작일
* @example: '2020-01-01'
* @example '2020-01-01'
*/
@IsDate()
from: Date;
Expand Down

0 comments on commit 0a061a8

Please sign in to comment.