Skip to content

Commit

Permalink
Update src/services/user-service.js
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
lelemm and coderabbitai[bot] authored Nov 11, 2024
1 parent da16b19 commit 3fd8546
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/services/user-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ export function deleteUser(userId) {
]).changes;
}
export function deleteUserAccess(userId) {
getAccountDb().mutate('DELETE FROM user_access WHERE user_id = ?', [userId]);
try {
return getAccountDb().mutate(

Check failure on line 124 in src/services/user-service.js

View workflow job for this annotation

GitHub Actions / lint

Replace `⏎······'DELETE·FROM·user_access·WHERE·user_id·=·?',` with `'DELETE·FROM·user_access·WHERE·user_id·=·?',·[`
'DELETE FROM user_access WHERE user_id = ?',
[userId],

Check failure on line 126 in src/services/user-service.js

View workflow job for this annotation

GitHub Actions / lint

Replace `[userId]` with `userId`
).changes;

Check failure on line 127 in src/services/user-service.js

View workflow job for this annotation

GitHub Actions / lint

Insert `]`
} catch (error) {
throw new Error(`Failed to delete user access: ${error.message}`);
}
}

export function transferAllFilesFromUser(ownerId, oldUserId) {
Expand Down

0 comments on commit 3fd8546

Please sign in to comment.