diff --git a/index.php b/index.php index db93091..0bff4aa 100644 --- a/index.php +++ b/index.php @@ -801,6 +801,7 @@ function confirmLogout(event) { event.preventDefault(); + var logoutUrl = event.currentTarget.href; Swal.fire({ title: 'Konfirmasi Logout', text: 'Apakah Anda yakin akan keluar dari sistem?', @@ -812,7 +813,7 @@ cancelButtonText: 'Batal' }).then((result) => { if (result.isConfirmed) { - window.location.href = event.currentTarget.href; + window.location.href = logoutUrl; } }); } diff --git a/logout.php b/logout.php index 69fc55f..2e20a21 100644 --- a/logout.php +++ b/logout.php @@ -1,4 +1,25 @@ -location='login.php'"; + \ No newline at end of file