Add user deletion in deleteAllUserData method to remove user account along with associated data
Despliegue Automático / desplegar (push) Successful in 35s

This commit is contained in:
2026-09-08 11:18:05 +02:00
parent e0e2a983f1
commit 1c8b0642b0
+1
View File
@@ -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.'