From f82a977734b7379176562d0419cb0b5f2b34f790 Mon Sep 17 00:00:00 2001 From: "carles.lobon" Date: Tue, 30 Apr 2024 13:36:51 +0200 Subject: [PATCH] arreglar check person --- back_api/routes/middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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');