se agrego drive correctamente
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user