Files
nodeMap/docs/services/database/area/updateAreaService.md
2025-05-28 08:04:34 +02:00

37 lines
546 B
Markdown

<!-- /docs/services/database/area/updateAreaService.md -->
# 🗺️ updateAreaService.js
Service zur Aktualisierung der Koordinaten eines Bereichs (Area) in der Datenbank.
## Verwendung
```js
await updateAreaService({
idLocation: 4,
idMap: 1,
newCoords: { x: 53.219, y: 8.435 }
});
```
## API-Route
```
PUT /api/talas_v5_DB/area/updateArea
```
## Payload
```json
{
"idLocation": 4,
"idMap": 1,
"x": 53.219,
"y": 8.435
}
```
## Rückgabe
- Erfolgreich: JSON mit Erfolgsmeldung
- Fehler: `throw new Error(...)` bei nicht OK