From ea8901379c8d6bc108c0c6ad8c45829322a3d05b Mon Sep 17 00:00:00 2001 From: Lemuel Marquez Date: Fri, 12 Feb 2021 13:58:29 -0600 Subject: [PATCH] responsable casos especiales --- server/db/install.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/db/install.js b/server/db/install.js index 7b8ce10..5f1b897 100644 --- a/server/db/install.js +++ b/server/db/install.js @@ -80,7 +80,7 @@ const sync = async () => { }; const dataTipoUsuario = async () => { - const data = ['admin', 'responsable', 'alumno', 'caso especial']; + const data = ['admin', 'responsable', 'alumno', 'casoEspecial']; console.log('\nPaso 3) Instalando data de TipoUsuario.'.bold.blue); for (let i = 0; i < data.length; i++) { @@ -125,12 +125,26 @@ const dataAdmin = async () => { }); }; +const dataResponsableCasoEspecial = async () => { + console.log( + '\nPaso 6) Instalando responsable de casos especiales.'.bold.blue + ); + await Usuario.create({ + usuario: process.env.CASOS_ESPECIALES, + password: encriptar.encriptar(process.env.CASOS_ESPECIALES_PASSWORD), + nombre: 'Marce', + idTipoUsuario: 4, + activo: true, + }); +}; + const exe = async () => { await drop(); await sync(); await dataTipoUsuario(); await dataStatus(); await dataAdmin(); + await dataResponsableCasoEspecial(); console.log( '\nSe ha instalado exitosamente la base de datos.\n'.underline.bold.green );