From 76faa482d56a39d45f5fa103d6745c79428d09b1 Mon Sep 17 00:00:00 2001 From: Ajay o s Date: Sun, 25 Jun 2023 14:06:06 +0530 Subject: [PATCH] fixed #46 fixed #45 --- Services/User.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Services/User.js b/Services/User.js index e52949c..8f7f332 100644 --- a/Services/User.js +++ b/Services/User.js @@ -431,11 +431,12 @@ exports.editAccess = async (data) => { } var blocked = "blocked"; var inactive = "inactive"; + var access_ = access ? blocked : inactive; // Update the user access with the provided data if (access != user.access) { user.access = access; - user.status = access ? blocked : inactive; + user.status = access_ await user.save(); }