utn-cli 2.0.35 → 2.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utn-cli",
3
- "version": "2.0.35",
3
+ "version": "2.0.36",
4
4
  "description": "Herramienta CLI unificada para la gestión de plantillas en SIGU.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -23,7 +23,7 @@ class ConsentimientoInformado {
23
23
 
24
24
  async AceptarConsentimientoInformado(Datos) {
25
25
  // Por agilidad no se usa el nombre formal de la tabla
26
- return await ejecutarConsulta("INSERT INTO `AceptacionesDeConsentimientosInformados` VALUES \
26
+ return await ejecutarConsulta("INSERT INTO `" + Miscelaneas.obtenerNombreLaBaseDeDatos() + "`.`AceptacionesDeConsentimientosInformados` VALUES \
27
27
  (NULL, ?, ?, 'Aceptación de versión de módulo', UUID(), NOW(4), NOW(4), ?)"
28
28
  , [await this.ConsentimientoInformadoId(), Datos.LastUser.split("@")[0], Datos.LastUser]);
29
29
  }
@@ -41,7 +41,7 @@ class ConsentimientoInformado {
41
41
 
42
42
  async ConsentimientoInformado(Datos) {
43
43
  // Por agilidad no se usa el nombre formal de la tabla
44
- const Aceptaciones = await ejecutarConsulta("SELECT COUNT(*) AS `Total` FROM `AceptacionesDeConsentimientosInformados` \
44
+ const Aceptaciones = await ejecutarConsulta("SELECT COUNT(*) AS `Total` FROM `" + Miscelaneas.obtenerNombreLaBaseDeDatos() + "`.`AceptacionesDeConsentimientosInformados` \
45
45
  WHERE `ConsentimientoInformadoId` = ? AND `Identificador` = ?"
46
46
  , [await this.ConsentimientoInformadoId(), Datos.LastUser.split("@")[0]]);
47
47
  const ValoresARetornar = {};
@@ -40,6 +40,10 @@ class Miscelaneo {
40
40
  this.EnlaceDeAcceso = undefined;
41
41
  };
42
42
 
43
+ async obtenerNombreLaBaseDeDatos() {
44
+ return this.NombreDelRepositorioDeLaBaseDeDatos.slice(0, -3);
45
+ }
46
+
43
47
  async RegistrarPermisoExtra(Permiso, Descripcion) {
44
48
  await ejecutarConsultaSIGU("SELECT IFNULL(MAX(`PermisoExtraId`), 0) + 1 INTO @`SiguientePermisoId` FROM `SIGU`.`SIGU_PermisosExtraV2`;\
45
49
  INSERT INTO `SIGU`.`SIGU_PermisosExtraV2` VALUES\
@@ -450,7 +454,6 @@ class Miscelaneo {
450
454
  , [Identificador]);
451
455
 
452
456
  // ENVIAR CORREO
453
- console.log(CorreoElectronico[0][0].CorreoElectronico)
454
457
  await envioDeCorreo(
455
458
  CorreoElectronico[0][0].CorreoElectronico,
456
459
  "Código de verificación 2FA",