import { Controller, Get, Inject } from '@nestjs/common'; import { ApiOkResponse, ApiTags } from '@nestjs/swagger'; import { BreadthResponseDto, FundsResponseDto, IndicesResponseDto, SectorsResponseDto, SummaryResponseDto, } from './market-overview.dto'; import { MarketOverviewService } from './market-overview.service'; @ApiTags('market-overview') @Controller('market-overview') export class MarketOverviewController { constructor(@Inject(MarketOverviewService) private readonly service: MarketOverviewService) {} @Get('summary') @ApiOkResponse({ type: SummaryResponseDto }) getSummary(): Promise { return this.service.getSummary(); } @Get('indices') @ApiOkResponse({ type: IndicesResponseDto }) getIndices(): Promise { return this.service.getIndices(); } @Get('breadth') @ApiOkResponse({ type: BreadthResponseDto }) getBreadth(): Promise { return this.service.getBreadth(); } @Get('sectors') @ApiOkResponse({ type: SectorsResponseDto }) getSectors(): Promise { return this.service.getSectors(); } @Get('funds') @ApiOkResponse({ type: FundsResponseDto }) getFunds(): Promise { return this.service.getFunds(); } }