SID933's picture
Corrigir erros de formatação no código
96ed566
import { Get, Controller, BadRequestException } from '@nestjs/common';
import { GetStatisticsUseCase } from '@/domain/alcremie/application/use-cases/cases/get-statistics/get-statistics';
@Controller('status')
export class GetStatusController {
constructor(private readonly getStatisticsUseCase: GetStatisticsUseCase) {}
@Get()
async getStatus() {
const result = await this.getStatisticsUseCase.execute({});
if (result.isLeft()) {
throw new BadRequestException();
}
return {
statistics: result.value,
};
}
}