implementação do logger
This commit is contained in:
@@ -1,44 +1,43 @@
|
||||
/* eslint-disable prettier/prettier */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
|
||||
/*
|
||||
https://docs.nestjs.com/controllers#controllers
|
||||
*/
|
||||
|
||||
import { Controller, Get, Param } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiParam } from '@nestjs/swagger';
|
||||
import { DataConsultService } from './data-consult.service';
|
||||
|
||||
@ApiTags('DataConsult')
|
||||
@Controller('api/v1/data-consult')
|
||||
export class DataConsultController {
|
||||
export class DataConsultController {
|
||||
|
||||
constructor(private readonly dataConsultService: DataConsultService) {}
|
||||
constructor(private readonly dataConsultService: DataConsultService) {}
|
||||
|
||||
|
||||
@Get('stores')
|
||||
async stores() {
|
||||
return this.dataConsultService.stores();
|
||||
}
|
||||
@Get('stores')
|
||||
@ApiOperation({ summary: 'Lista todas as lojas' })
|
||||
async stores() {
|
||||
return this.dataConsultService.stores();
|
||||
}
|
||||
|
||||
@Get('sellers')
|
||||
async sellers() {
|
||||
return this.dataConsultService.sellers();
|
||||
}
|
||||
@Get('sellers')
|
||||
@ApiOperation({ summary: 'Lista todos os vendedores' })
|
||||
async sellers() {
|
||||
return this.dataConsultService.sellers();
|
||||
}
|
||||
|
||||
@Get('billings')
|
||||
async billings() {
|
||||
return this.dataConsultService.billings();
|
||||
}
|
||||
@Get('billings')
|
||||
@ApiOperation({ summary: 'Retorna informações de faturamento' })
|
||||
async billings() {
|
||||
return this.dataConsultService.billings();
|
||||
}
|
||||
|
||||
@Get('customers/:filter')
|
||||
async customer(@Param('filter') filter: string) {
|
||||
return this.dataConsultService.customers(filter);
|
||||
}
|
||||
|
||||
@Get('products/:filter')
|
||||
async products(@Param('filter') filter: string) {
|
||||
return this.dataConsultService.products(filter);
|
||||
}
|
||||
@Get('customers/:filter')
|
||||
@ApiOperation({ summary: 'Filtra clientes pelo parâmetro fornecido' })
|
||||
@ApiParam({ name: 'filter', description: 'Filtro de busca para clientes' })
|
||||
async customer(@Param('filter') filter: string) {
|
||||
return this.dataConsultService.customers(filter);
|
||||
}
|
||||
|
||||
@Get('products/:filter')
|
||||
@ApiOperation({ summary: 'Filtra produtos pelo parâmetro fornecido' })
|
||||
@ApiParam({ name: 'filter', description: 'Filtro de busca para produtos' })
|
||||
async products(@Param('filter') filter: string) {
|
||||
return this.dataConsultService.products(filter);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user