fixed name
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
import {
|
||||
Controller,
|
||||
Get,
|
||||
Post,
|
||||
Body,
|
||||
Patch,
|
||||
Param,
|
||||
Delete,
|
||||
} from '@nestjs/common';
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { NombreTransaccionService } from './nombre-transaccion.service';
|
||||
import { CreateNombreTransaccionDto } from './dto/create-nombre-transaccion.dto';
|
||||
|
||||
@Controller('nombre-transaccion')
|
||||
export class NombreTransaccionController {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@ import { JwtService } from '@nestjs/jwt';
|
||||
import { Repository } from 'typeorm';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Persona } from './entities/persona.entity';
|
||||
import * as bcrypt from 'bcrypt';
|
||||
|
||||
import passwordRand from './password';
|
||||
@Injectable()
|
||||
export class PersonaService {
|
||||
constructor(
|
||||
@@ -68,7 +66,7 @@ export class PersonaService {
|
||||
const numeroIdentificar = data.email.split('@')[0];
|
||||
|
||||
let tipo;
|
||||
if (Number(numeroIdentificar) === 9) {
|
||||
if (numeroIdentificar.length === 9) {
|
||||
tipo = 'Alumno';
|
||||
realName = apellidoArray.slice(2).join(' ') || '';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user