37 lines
546 B
Markdown
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 |