Skip to content

Commit

Permalink
removing logs
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgehl3n committed Nov 25, 2023
1 parent fd759fd commit 4483ea2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/middlewares/acl/CheckAclAnimalsPermission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ export default function CheckAclAnimalsPermission(role: Roles) {
const id = req.params.id || req.body.id;

const animal = await Animal.findByPk(id);
console.log(animal)
console.log(userRoles)
if (userRoles.some(x =>
x.idRole && x.idRole >= role &&
x.idInstitution?.toString() === animal?.idInstitution
x.idInstitution === animal?.idInstitution
)) {
return next();
}
Expand Down

0 comments on commit 4483ea2

Please sign in to comment.