Perbaikan Generate Token Baru

This commit is contained in:
Ariyutta
2026-09-27 15:56:04 +07:00
parent 05ab6fee35
commit dcf57bcfdc
3 changed files with 40 additions and 18 deletions
@@ -210,7 +210,7 @@
<script>
const pengajuanId = {{ (int) $id }};
const token = new URLSearchParams(window.location.search).get('token');
let token = new URLSearchParams(window.location.search).get('token');
const apiBase = "{{ url('/api/v1/verifikasi-absen') }}/" + pengajuanId;
function showNotification(status, title, text) {
@@ -288,6 +288,13 @@
url: `${apiBase}?token=${encodeURIComponent(token)}`,
method: 'GET',
success: function (res) {
if (res.new_token) {
token = res.new_token;
const url = new URL(window.location.href);
url.searchParams.set('token', token);
window.history.replaceState({}, '', url);
}
tampilkanDetail(res.data, res.state);
selesaiLoading();
},