diff --git a/back_api/routes/middleware.js b/back_api/routes/middleware.js index a157c9e..9e381e9 100644 --- a/back_api/routes/middleware.js +++ b/back_api/routes/middleware.js @@ -66,7 +66,7 @@ async function checkPerson(req, res, next) { const clientDoc = await clientRef.get(); const adminReg = db.collection('administradors').doc(decryptedUid); - const adminDoc = await clientRef.get(); + const adminDoc = await adminReg.get(); if (!userDoc.exists && !clientDoc.exists && !adminDoc.exists) { return res.status(404).send('Usuario o cliente que envió la solicitud no encontrado');