error en rechazo corregido

This commit is contained in:
Lemuel Marquez
2020-12-08 14:43:40 -06:00
parent 0a249ff3f9
commit 683fef59a3
4 changed files with 14 additions and 5 deletions
@@ -13,7 +13,10 @@ const cancelar = async (body) => {
return Servicio.findOne({
where: { idServicio },
include: [{ model: Programa, include: [{ model: Usuario }] }],
include: [
{ model: Usuario },
{ model: Programa, include: [{ model: Usuario }] },
],
})
.then((res) => {
if (!res) throw new Error('No existe este Servicio Social.');