29 lines
873 B
TypeScript
29 lines
873 B
TypeScript
import { Controller, Get, Inject } from '@nestjs/common';
|
|
import { ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
|
|
|
import {
|
|
ShortTermConclusionResponseDto,
|
|
ShortTermEmotionResponseDto,
|
|
} from './short-term.dto';
|
|
import { ShortTermMarketService } from './short-term.service';
|
|
|
|
@ApiTags('market-overview-short-term')
|
|
@Controller('market-overview/short-term')
|
|
export class ShortTermMarketController {
|
|
constructor(
|
|
@Inject(ShortTermMarketService) private readonly service: ShortTermMarketService,
|
|
) {}
|
|
|
|
@Get('emotion')
|
|
@ApiOkResponse({ type: ShortTermEmotionResponseDto })
|
|
getEmotion(): Promise<ShortTermEmotionResponseDto> {
|
|
return this.service.getEmotion();
|
|
}
|
|
|
|
@Get('conclusion')
|
|
@ApiOkResponse({ type: ShortTermConclusionResponseDto })
|
|
getConclusion(): Promise<ShortTermConclusionResponseDto> {
|
|
return this.service.getConclusion();
|
|
}
|
|
}
|