Skip to content

Commit

Permalink
fixed #46 fixed #45
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajayos authored Jun 25, 2023
1 parent d16d02f commit 76faa48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Services/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 76faa48

Please sign in to comment.