diff --git a/server/controller/Servicio/nuevo.js b/server/controller/Servicio/nuevo.js index 1d8beba..7a9520e 100644 --- a/server/controller/Servicio/nuevo.js +++ b/server/controller/Servicio/nuevo.js @@ -42,9 +42,7 @@ const nuevo = async (body, file) => { ? validar.validarTexto(body.profesor, 'profesor', true, 50) : ''; - return Usuario.findOne({ - where: { idUsuario }, - }) + return Usuario.findOne({ where: { idUsuario } }) .then((res) => { if (!res) throw new Error('Este alumno no existe en la db.'); if (res.idTipoUsuario !== 3) @@ -82,7 +80,7 @@ const nuevo = async (body, file) => { let carpeta = ''; drive - .folder(numeroCuenta) + .mkDir(numeroCuenta) .then((res) => { carpeta = res; return drive.uploadFile( @@ -97,7 +95,7 @@ const nuevo = async (body, file) => { { carpeta, cartaAceptacion: res }, { where: { idServicio: servicio.idServicio } } ) - ) + ); return { message: `Se Pre-Registro correctamente a este alumno.` }; }); }; diff --git a/server/helper/drive.js b/server/helper/drive.js index 27b9650..d6c9de0 100644 --- a/server/helper/drive.js +++ b/server/helper/drive.js @@ -179,4 +179,5 @@ module.exports = { folder, uploadFile, deleteFile, + mkDir, };