From 0cb91d8b9e856f9330bdeac2a01de2aa031e047e Mon Sep 17 00:00:00 2001 From: evenegas Date: Wed, 7 Jan 2026 13:41:11 -0600 Subject: [PATCH] se agrego drive correctamente --- src/drive/drive.service.ts | 3 ++- src/servicio/servicio.controller.ts | 1 + src/servicio/servicio.service.ts | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/drive/drive.service.ts b/src/drive/drive.service.ts index e40acc9..e0bb949 100644 --- a/src/drive/drive.service.ts +++ b/src/drive/drive.service.ts @@ -98,7 +98,8 @@ export class DriveService { supportsAllDrives: true, }); - fs.unlinkSync(filePath); + + console.log('Archivo subido a Drive, ID:', res.data.id); return res.data.id!; } catch (err) { throw new InternalServerErrorException( diff --git a/src/servicio/servicio.controller.ts b/src/servicio/servicio.controller.ts index 3173ad7..35fceaa 100644 --- a/src/servicio/servicio.controller.ts +++ b/src/servicio/servicio.controller.ts @@ -135,6 +135,7 @@ export class ServicioController { @Body('data') dataJson: string, ) { const body = JSON.parse(dataJson); + console.log('file:', file) return this.servicioService.cartaTermino(body.idServicio, file); } diff --git a/src/servicio/servicio.service.ts b/src/servicio/servicio.service.ts index d8d2d17..641fa61 100644 --- a/src/servicio/servicio.service.ts +++ b/src/servicio/servicio.service.ts @@ -286,10 +286,13 @@ export class ServicioService { 1000, )}`; + + const servicio = await this.servicioRepo.findOne({ where: { idServicio }, + relations: ['status'], }); - + console.log('Servicio encontrado:', servicio); if (!servicio) { throw new NotFoundException('Este servicio no existe.'); }