fix: corrige erros do ESLint e configura variáveis globais
- Adiciona variáveis globais do Node.js (process, console, __dirname, require, module, exports) - Adiciona variáveis globais do Jest (describe, it, beforeEach, fail, etc.) - Configura ESLint para arquivos JavaScript de configuração - Remove diretivas eslint-disable não utilizadas - Corrige variáveis não usadas prefixando com _ - Ajusta regras do ESLint para ignorar variáveis que começam com _ - Formata código com Prettier
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
import { Injectable, HttpException, HttpStatus, Inject, Logger } from '@nestjs/common';
|
||||
import {
|
||||
Injectable,
|
||||
HttpException,
|
||||
HttpStatus,
|
||||
Inject,
|
||||
Logger,
|
||||
} from '@nestjs/common';
|
||||
import { DataConsultRepository } from './data-consult.repository';
|
||||
import { StoreDto } from './dto/store.dto';
|
||||
import { SellerDto } from './dto/seller.dto';
|
||||
@@ -231,9 +237,14 @@ export class DataConsultService {
|
||||
this.logger.log(`Buscando produtos por codauxiliar: ${codauxiliar}`);
|
||||
try {
|
||||
if (!codauxiliar || typeof codauxiliar !== 'string') {
|
||||
throw new HttpException('Código auxiliar inválido', HttpStatus.BAD_REQUEST);
|
||||
throw new HttpException(
|
||||
'Código auxiliar inválido',
|
||||
HttpStatus.BAD_REQUEST,
|
||||
);
|
||||
}
|
||||
const products = await this.repository.findProductsByCodauxiliar(codauxiliar);
|
||||
const products = await this.repository.findProductsByCodauxiliar(
|
||||
codauxiliar,
|
||||
);
|
||||
return products.map((product) => new ProductDto(product));
|
||||
} catch (error) {
|
||||
this.logger.error('Erro ao buscar produtos por codauxiliar', error);
|
||||
|
||||
Reference in New Issue
Block a user