Skip to content

Commit 9584349

Browse files
committed
fix: remove undefined parameter from get2FaConfirmationResult call in save interceptor
1 parent cfc02e4 commit 9584349

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

adminforth/documentation/docs/tutorial/07-Plugins/02-TwoFactorsAuth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ registerSaveInterceptor(async ({ action, values, resource }) => {
342342
// action is 'create' or 'edit'
343343
const modal = (window as any)?.adminforthTwoFaModal;
344344
if (modal?.get2FaConfirmationResult) {
345-
const confirmationResult = await modal.get2FaConfirmationResult(undefined, 'Confirm to save changes');
345+
const confirmationResult = await modal.get2FaConfirmationResult('Confirm to save changes');
346346
if (!confirmationResult) {
347347
return { ok: false, error: 'Two-factor authentication cancelled' };
348348
}

dev-demo/custom/SaveInterceptor.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ registerSaveInterceptor(async ({ action, values, resource }) => {
88
const modal = window?.adminforthTwoFaModal;
99
if (modal?.get2FaConfirmationResult) {
1010
const confirmationResult = await modal.get2FaConfirmationResult(
11-
undefined,
1211
'Confirm to save changes'
1312
);
1413
return { ok: true, extra: { confirmationResult } };

0 commit comments

Comments
 (0)