Modificciones sin subir
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user