// /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;
};
