Skip to content

Commit

Permalink
Edit DELETE
Browse files Browse the repository at this point in the history
  • Loading branch information
tabitapetruneac committed Sep 4, 2024
1 parent 521f091 commit de27cd3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bff/static/js/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ function deleteUser(userId) {
console.error('There was a problem with the fetch operation:', error.message);
});
}
document.getElementById('delete-button').addEventListener('click', deleteUser() {
const userId = this.getAttribute('data-user-id');
deleteUser(userId);
});

document.querySelectorAll('.delete-button').forEach(button => {
button.addEventListener('click', function() {
const userId = this.getAttribute('data-user-id');
deleteUser(userId);
});
});

0 comments on commit de27cd3

Please sign in to comment.