|
@@ -1,4 +1,4 @@
|
|
|
-import { Body, Controller, Post } from '@nestjs/common';
|
|
|
|
|
|
|
+import { Body, Controller, Post, Logger } from '@nestjs/common';
|
|
|
import {
|
|
import {
|
|
|
AdsStatsQueryDto,
|
|
AdsStatsQueryDto,
|
|
|
ChannelStatsQueryDto,
|
|
ChannelStatsQueryDto,
|
|
@@ -22,6 +22,8 @@ const PaginatedResponseSchema = {
|
|
|
@ApiTags('Stats Reporting')
|
|
@ApiTags('Stats Reporting')
|
|
|
@Controller('stats/reporting')
|
|
@Controller('stats/reporting')
|
|
|
export class StatsReportingController {
|
|
export class StatsReportingController {
|
|
|
|
|
+ private readonly logger = new Logger(StatsReportingController.name);
|
|
|
|
|
+
|
|
|
constructor(private readonly statsReportingService: StatsReportingService) {}
|
|
constructor(private readonly statsReportingService: StatsReportingService) {}
|
|
|
|
|
|
|
|
@Post('ads/hourly')
|
|
@Post('ads/hourly')
|
|
@@ -33,6 +35,9 @@ export class StatsReportingController {
|
|
|
schema: PaginatedResponseSchema,
|
|
schema: PaginatedResponseSchema,
|
|
|
})
|
|
})
|
|
|
async getAdsHourly(@Body() dto: AdsStatsQueryDto) {
|
|
async getAdsHourly(@Body() dto: AdsStatsQueryDto) {
|
|
|
|
|
+ this.logger.log(`getAdsHourly called with dto: ${JSON.stringify(dto)}`);
|
|
|
|
|
+ this.logger.log('fromSec', typeof dto.fromSec, dto.fromSec);
|
|
|
|
|
+ this.logger.log('toSec', typeof dto.toSec, dto.toSec);
|
|
|
return this.statsReportingService.getAdsHourly(dto);
|
|
return this.statsReportingService.getAdsHourly(dto);
|
|
|
}
|
|
}
|
|
|
|
|
|