From 445f953338a67c34fedc4ab97fc3e59237d8af0c Mon Sep 17 00:00:00 2001 From: Dultus Date: Sun, 8 Dec 2024 20:19:07 +0100 Subject: [PATCH] Fixxed error --- Extension/background.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Extension/background.js b/Extension/background.js index 19dceea..567d868 100644 --- a/Extension/background.js +++ b/Extension/background.js @@ -46,8 +46,10 @@ function updateHorseButton() { const horseData = basicDataResponse.data; // Pferd beim Backend prüfen - getHorseLoadStateAPIAsync(horseData.id); - setBaseDataHorseAPI(horseData.id, horseData) + getHorseLoadStateAPIAsync(horseData.id) + + // Basisdaten an die API senden + setBaseDataHorseAPI(horseData.id, horseData) .then(() => { console.log("Base data updated in API for horse ID:", horseData.id); // Schritt 2: Aktuelle Horse-Daten holen (abhängig vom aktiven Tab) @@ -61,10 +63,8 @@ function updateHorseButton() { console.log("Current horse data received:", currentDataResponse.data); }); }); - }); - }); - }) - .catch((error) => { - console.error("Error in updateHorseButton:", error); + + console.error("Error updating horse data:", error); }); -} +}); +} \ No newline at end of file