fixed name
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import axios from 'axios';
|
||||
import { PagoKioscoService } from 'src/pago-kiosco/pago-kiosco.service';
|
||||
import { PersonaService } from 'src/persona/persona.service';
|
||||
import { TransaccionService } from 'src/transaccion/transaccion.service';
|
||||
@@ -22,7 +23,7 @@ export class OperationsService {
|
||||
};
|
||||
|
||||
const responseTransaccion = this.transaccionService.create(transaction);
|
||||
|
||||
console.log(responseTransaccion);
|
||||
const pagoKiosco = {
|
||||
idTransaccion: (await responseTransaccion).idTransaccion,
|
||||
monto: cantidad,
|
||||
@@ -35,6 +36,20 @@ export class OperationsService {
|
||||
|
||||
const newSaldo = this.personaService.updateSaldo(idPersona, cantidad);
|
||||
|
||||
// const res = await axios.post(
|
||||
// `${process.env.API_AT_URL}/operations/receipt`,
|
||||
// {
|
||||
// id_cuenta: idPersona,
|
||||
// monto: cantidad,
|
||||
// fecha_recibo: today,
|
||||
// folio_recibo: `FOL-${Date.now()}`,
|
||||
// },
|
||||
// );
|
||||
|
||||
// if (res.status !== 200) {
|
||||
// throw new Error('Error al registrar crédito en API externa');
|
||||
// }
|
||||
|
||||
return newSaldo;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user