großes refactoring
This commit is contained in:
@@ -777,6 +777,16 @@
|
||||
|
||||
async function loadLock() {
|
||||
const res = await fetch('/keyholder/cardlock/' + lockId);
|
||||
if (res.status === 404) {
|
||||
// Prüfen, ob es ein TimeLock ist
|
||||
const tlRes = await fetch('/keyholder/timelock/' + lockId);
|
||||
if (tlRes.ok) {
|
||||
window.location.replace('/activetimelock.html?lockId=' + lockId);
|
||||
return;
|
||||
}
|
||||
document.getElementById('lockContent').textContent = 'Lock nicht gefunden.';
|
||||
return;
|
||||
}
|
||||
if (!res.ok) {
|
||||
document.getElementById('lockContent').textContent = 'Lock nicht gefunden.';
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user