Skip to content

Commit

Permalink
Adjust delete helper name consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikearaya committed Dec 20, 2024
1 parent c30cf57 commit 416ed94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface UsersWebAuthnModule {
extensionOptions?: any,
) => Promise<any>;
verifyCredentialRequest: (userPublicKeys: any[], username: string, credentials: any) => Promise<any>;
deleteUserCredentials: (username: string) => Promise<number>;
deleteUserWebAuthnCredentials: (username: string) => Promise<number>;
}

const logger = createLogger('unchained:core-users');
Expand Down Expand Up @@ -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,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/services/deleteUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down

0 comments on commit 416ed94

Please sign in to comment.