Skip to content

Commit

Permalink
refactor: Simplify code for toggling user status in ActivityRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeCarillo committed Jun 9, 2024
1 parent 7b8bb04 commit 0191985
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/repositories/database/repositories/ActivityRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,8 @@ export class ActivityRepo implements IActivityRepo {
status: !user.status
}, {
where: {
[Op.and]: [
{ activity_id: activity_id },
{ user_id: user.user_id }
]
activity_id: activity_id,
user_id: user.user_id
}
});
if (response_user[0] === 0) {
Expand Down

0 comments on commit 0191985

Please sign in to comment.