refactor: POI aktualisieren auf updatePoiThunk + ID aus react-select umgestellt
- Thunk getDeviceIdByNameThunk entfernt - idLD direkt aus Dropdown gelesen - updatePoiThunk + updatePoiService vollständig eingebunden - Fehlerbehandlung in handleSubmit verbessert - Version erhöht auf 1.1.162
This commit is contained in:
10
services/database/getDeviceIdByNameService.js
Normal file
10
services/database/getDeviceIdByNameService.js
Normal file
@@ -0,0 +1,10 @@
|
||||
// /services/database/getDeviceIdByNameService.js
|
||||
|
||||
export const getDeviceIdByNameService = async (deviceName) => {
|
||||
const response = await fetch(`/api/talas_v5_DB/locationDevice/getDeviceId?deviceName=${encodeURIComponent(deviceName)}`);
|
||||
if (!response.ok) {
|
||||
throw new Error("Fehler beim Abrufen der Geräte-ID.");
|
||||
}
|
||||
const data = await response.json();
|
||||
return data.idLD;
|
||||
};
|
||||
Reference in New Issue
Block a user