From 1c8b0642b0da88fdf26a4692716dbaa3f67bc233 Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 8 Sep 2026 11:18:05 +0200 Subject: [PATCH] Add user deletion in deleteAllUserData method to remove user account along with associated data --- src/services/authService.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/authService.js b/src/services/authService.js index 2b227b1..fb7f7c3 100644 --- a/src/services/authService.js +++ b/src/services/authService.js @@ -98,6 +98,7 @@ class AuthService { await Note.destroy({ where: { userId }, transaction }); await Category.destroy({ where: { userId }, transaction }); await RefreshToken.destroy({ where: { userId }, transaction }); + await User.destroy({ where: { id: userId }, transaction }); return { message: 'Datos del usuario eliminados correctamente; se eliminaron todos los tokens.'