Perbaikan Generate Token Baru
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user