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 19, 2024
1 parent ba87b33 commit faa8eeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 faa8eeb

Please sign in to comment.