diff --git a/data/rfid.html b/data/rfid.html
index 3f0c299..e2c4ff9 100644
--- a/data/rfid.html
+++ b/data/rfid.html
@@ -66,6 +66,8 @@
// Globale Variablen
let rfidData = [];
let isLoading = false;
+ let DBUrl = "db.reptilfpv.de:3000";
+ var APIKey;
// Maximales Datum auf heute setzen
document.addEventListener('DOMContentLoaded', function() {
@@ -244,6 +246,7 @@
window.addEventListener('load', function() {
document.getElementById('uid').focus();
checkServerStatus();
+ loadLicence();
});
// Enter-Taste in UID Feld zum nächsten Feld springen
@@ -333,7 +336,7 @@
async function checkServerStatus() {
try {
- const response = await fetch('/api/health');
+ const response = await fetch('/api/health');
const data = await response.json();
if (!data.status || data.status !== 'connected') {
@@ -348,6 +351,18 @@
return false;
}
}
+
+ function loadLicence() {
+ fetch("/api/get-licence")
+ .then((response) => response.json())
+ .then((data) => {
+ APIKey = data.licence || "";
+
+ })
+ .catch((error) =>
+ showMessage("Fehler beim Laden der Lizenz", "error")
+ );
+ }