From 416ed94457b959eec3d8d98b394759bcb44177d6 Mon Sep 17 00:00:00 2001 From: Mikael Araya Date: Thu, 19 Dec 2024 15:49:30 +0300 Subject: [PATCH] Adjust delete helper name consistency --- .../core-users/src/module/configureUsersWebAuthnModule.ts | 4 ++-- packages/core/src/services/deleteUser.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core-users/src/module/configureUsersWebAuthnModule.ts b/packages/core-users/src/module/configureUsersWebAuthnModule.ts index 758aa0423..5409c3742 100644 --- a/packages/core-users/src/module/configureUsersWebAuthnModule.ts +++ b/packages/core-users/src/module/configureUsersWebAuthnModule.ts @@ -19,7 +19,7 @@ export interface UsersWebAuthnModule { extensionOptions?: any, ) => Promise; verifyCredentialRequest: (userPublicKeys: any[], username: string, credentials: any) => Promise; - deleteUserCredentials: (username: string) => Promise; + deleteUserWebAuthnCredentials: (username: string) => Promise; } const logger = createLogger('unchained:core-users'); @@ -232,7 +232,7 @@ export const configureUsersWebAuthnModule = async ({ const loginResult = await f2l.assertionResult(assertionResponse, assertionExpectations); return { userHandle: loginResult?.authnrData?.get('userHandle') }; }, - deleteUserCredentials: async (username: string) => { + deleteUserWebAuthnCredentials: async (username: string) => { const { deletedCount } = await WebAuthnCredentialsCreationRequests.deleteMany({ username, }); diff --git a/packages/core/src/services/deleteUser.ts b/packages/core/src/services/deleteUser.ts index 07de4eb5f..6b73eae44 100644 --- a/packages/core/src/services/deleteUser.ts +++ b/packages/core/src/services/deleteUser.ts @@ -9,7 +9,7 @@ export async function deleteUserService(this: Modules, { userId }: { userId: str await this.quotations.deleteRequestedUserQuotations(userId); await this.enrollments.deleteInactiveUserEnrollments(userId); await this.payment.paymentCredentials.deleteUserPaymentCredentials(userId); - await this.users.webAuthn.deleteUserCredentials(user.username); + await this.users.webAuthn.deleteUserWebAuthnCredentials(user.username); const carts = await this.orders.findOrders({ userId, status: null });