Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f02dd40d51 | |||
| b607cc2ccb | |||
| b5a832e179 |
Binary file not shown.
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
@@ -8,6 +8,6 @@ export class carruselDto {
|
|||||||
link: string
|
link: string
|
||||||
|
|
||||||
// @IsNotEmpty() valida que no sea nulo ni undefined ni cadena vacía
|
// @IsNotEmpty() valida que no sea nulo ni undefined ni cadena vacía
|
||||||
@IsOptional()
|
// @IsOptional()
|
||||||
orden?: string
|
// orden?: string
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ export class Carrusel {
|
|||||||
link: string
|
link: string
|
||||||
/* "https://www.acatlan.unam.mx/" */
|
/* "https://www.acatlan.unam.mx/" */
|
||||||
|
|
||||||
@Column({length: 20})
|
// @Column({length: 20})
|
||||||
orden: string
|
// orden: string
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
Body,
|
Body,
|
||||||
Controller,
|
Controller,
|
||||||
|
NotFoundException,
|
||||||
Post,
|
Post,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { InscripcionDscService } from './inscripcion-dsc.service';
|
import { InscripcionDscService } from './inscripcion-dsc.service';
|
||||||
@@ -13,15 +14,19 @@ export class InscripcionDscController {
|
|||||||
@Post('confirmacion')
|
@Post('confirmacion')
|
||||||
async confirmacionDsc(@Body() body: any) {
|
async confirmacionDsc(@Body() body: any) {
|
||||||
const { accountNumber } = body;
|
const { accountNumber } = body;
|
||||||
|
console.log('Entro a la confirmacion')
|
||||||
|
|
||||||
const userVerification = await this.inscripcionService.userVerification(accountNumber);
|
const userVerification = await this.inscripcionService.userVerification(accountNumber);
|
||||||
/* console.log(userVerification) */
|
/* console.log(userVerification) */
|
||||||
|
console.log('Usuario verificacion', userVerification);
|
||||||
if(!userVerification){
|
if(!userVerification){
|
||||||
return {
|
throw new NotFoundException('El usuario no se encuentra inscrito');
|
||||||
error: true,
|
|
||||||
msj: 'El usuario no se encuentra inscrito',
|
// return {
|
||||||
desc: '',
|
// error: true,
|
||||||
};
|
// msj: 'El usuario no se encuentra inscrito',
|
||||||
|
// desc: '',
|
||||||
|
// };
|
||||||
}
|
}
|
||||||
|
|
||||||
const userInformation = userVerification;
|
const userInformation = userVerification;
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ export class InscripcionDscService {
|
|||||||
JOIN periodo P ON (P.id_periodo = AI.id_periodo)
|
JOIN periodo P ON (P.id_periodo = AI.id_periodo)
|
||||||
WHERE A.id_cuenta = "${accountNumber}" and P.activo=true`;
|
WHERE A.id_cuenta = "${accountNumber}" and P.activo=true`;
|
||||||
|
|
||||||
|
console.log('despues de el select', userInformationQuery)
|
||||||
|
|
||||||
const qryEjemplo = `SELECT * FROM alumno WHERE id_cuenta="${accountNumber}";`;
|
const qryEjemplo = `SELECT * FROM alumno WHERE id_cuenta="${accountNumber}";`;
|
||||||
|
|
||||||
const [results] = await connection.query(userInformationQuery);
|
const [results] = await connection.query(userInformationQuery);
|
||||||
@@ -30,8 +32,10 @@ export class InscripcionDscService {
|
|||||||
/* console.log('The solution is: ', resultsArray); */
|
/* console.log('The solution is: ', resultsArray); */
|
||||||
console.log('The solution is: ', resultsArray);
|
console.log('The solution is: ', resultsArray);
|
||||||
|
|
||||||
|
console.log('Resultados', results)
|
||||||
return results;
|
return results;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log('Entro al error', error)
|
||||||
throw error;
|
throw error;
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@@ -39,6 +43,7 @@ export class InscripcionDscService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async userConfirmation(accountNumber: string): Promise<any> {
|
async userConfirmation(accountNumber: string): Promise<any> {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user