update librerias
This commit is contained in:
@@ -23,15 +23,17 @@ export class MarcaService {
|
||||
}
|
||||
|
||||
findById(id_marca: number, tipo: string, validarExistencia = true) {
|
||||
return this.repository.findOne({ id_marca, tipo }).then((marca) => {
|
||||
if (validarExistencia && !marca)
|
||||
throw new ConflictException('No existe esta marca.');
|
||||
return marca;
|
||||
});
|
||||
return this.repository
|
||||
.findOne({ where: { id_marca, tipo } })
|
||||
.then((marca) => {
|
||||
if (validarExistencia && !marca)
|
||||
throw new ConflictException('No existe esta marca.');
|
||||
return marca;
|
||||
});
|
||||
}
|
||||
|
||||
findByMarca(marca: string, tipo: string, validarExistencia = true) {
|
||||
return this.repository.findOne({ marca, tipo }).then((marca) => {
|
||||
return this.repository.findOne({ where: { marca, tipo } }).then((marca) => {
|
||||
if (validarExistencia && !marca)
|
||||
throw new ConflictException('No existe esta marca.');
|
||||
return marca;
|
||||
|
||||
Reference in New Issue
Block a user