@@ -39,7 +39,7 @@ watch(twoFactorEnabled, () => {
3939const  enableTwoFactorAuthentication  =  () =>  {
4040    enabling .value  =  true ; 
4141
42-     router .post (' /user/ two-factor-authentication '  , {}, { 
42+     router .post (route ( ' two-factor.enable ' ) , {}, { 
4343        preserveScroll:  true , 
4444        onSuccess :  () =>  Promise .all ([ 
4545            showQrCode (), 
@@ -54,25 +54,25 @@ const enableTwoFactorAuthentication = () => {
5454}; 
5555
5656const  showQrCode  =  () =>  {
57-     return  axios .get (' /user/ two-factor- qr-code'  ).then (response  =>  { 
57+     return  axios .get (route ( ' two-factor. qr-code' ) ).then (response  =>  { 
5858        qrCode .value  =  response .data .svg ; 
5959    }); 
6060}; 
6161
6262const  showSetupKey  =  () =>  {
63-     return  axios .get (' /user/ two-factor- secret-key'  ).then (response  =>  { 
63+     return  axios .get (route ( ' two-factor. secret-key' ) ).then (response  =>  { 
6464        setupKey .value  =  response .data .secretKey ; 
6565    }); 
6666} 
6767
6868const  showRecoveryCodes  =  () =>  {
69-     return  axios .get (' /user/ two-factor- recovery-codes'  ).then (response  =>  { 
69+     return  axios .get (route ( ' two-factor. recovery-codes' ) ).then (response  =>  { 
7070        recoveryCodes .value  =  response .data ; 
7171    }); 
7272}; 
7373
7474const  confirmTwoFactorAuthentication  =  () =>  {
75-     confirmationForm .post (' /user/confirmed- two-factor-authentication '  , { 
75+     confirmationForm .post (route ( ' two-factor.confirm ' ) , { 
7676        errorBag:  " confirmTwoFactorAuthentication"  , 
7777        preserveScroll:  true , 
7878        preserveState:  true , 
@@ -86,14 +86,14 @@ const confirmTwoFactorAuthentication = () => {
8686
8787const  regenerateRecoveryCodes  =  () =>  {
8888    axios 
89-         .post (' /user/ two-factor- recovery-codes'  ) 
89+         .post (route ( ' two-factor. recovery-codes' ) ) 
9090        .then (() =>  showRecoveryCodes ()); 
9191}; 
9292
9393const  disableTwoFactorAuthentication  =  () =>  {
9494    disabling .value  =  true ; 
9595
96-     router .delete (' /user/ two-factor-authentication '  , { 
96+     router .delete (route ( ' two-factor.disable ' ) , { 
9797        preserveScroll:  true , 
9898        onSuccess :  () =>  { 
9999            disabling .value  =  false ; 
0 commit comments