Modificciones sin subir

This commit is contained in:
santiago
2025-10-01 12:46:12 -06:00
parent 794d2bcd90
commit 6eb53a327a
3 changed files with 14 additions and 12 deletions
+11 -11
View File
@@ -71,19 +71,19 @@ export class CuestionarioController {
}
@Post('carga-masiva')
@UseInterceptors(FileInterceptor('file'))
async cargaMasiva(@UploadedFile() file: Express.Multer.File) {
if (!file) {
throw new BadRequestException('No se ha subido ningún archivo');
}
@UseInterceptors(FileInterceptor('file'))
async cargaMasiva(@UploadedFile() file: Express.Multer.File) {
if (!file) {
throw new BadRequestException('No se ha subido ningún archivo');
}
const cuestionarios = await this.cargaMasiva(file);
const cuestionarios = await this.cargaMasiva(file);
return {
message: 'Carga masiva exitosa',
total: cuestionarios.length,
data: cuestionarios,
};
return {
message: 'Carga masiva exitosa',
total: cuestionarios.length,
data: cuestionarios,
};
}
+1 -1
View File
@@ -132,7 +132,7 @@ export class CuestionarioService {
const plantilla = qRow.getCell(9).value ? Number(row.getCell(8).value) : null;
if (plantilla && PLANTILLA_MAP[plantilla]) {
if (plantilla && PLANTILLA_MAP[plantilla]) {
const fecha_inicio = new Date(qRow.getCell(4).value as string);
const fecha_fin = new Date(qRow.getCell(5).value as string);
const id_tipo_evento= Number(qRow.getCell(8).value);
+2
View File
@@ -50,6 +50,7 @@ export class QrTokenService {
if (!fecha_fin) {
throw new UnauthorizedException('Cuestionario no encontrado');
}
// Convert fecha_fin to seconds from now for expiresIn
const expiresInSeconds = Math.floor((fecha_fin?.fecha_fin.getTime() - Date.now()) / 1000);
@@ -64,6 +65,7 @@ export class QrTokenService {
* @param token Token JWT a validar
* @returns Datos decodificados del token o null si es inválido
*/
async validateQrToken(token: string): Promise<{
id_participante
: number;