docs
This commit is contained in:
29
docs/pages/api/talas_v5_DB/station/getAllStationsNames.md
Normal file
29
docs/pages/api/talas_v5_DB/station/getAllStationsNames.md
Normal file
@@ -0,0 +1,29 @@
|
||||
<!-- /docs/pages/api/talas_v5_DB/station/getAllStationsNames.md -->
|
||||
|
||||
# 🏷️ getAllStationsNames.js
|
||||
|
||||
Liefert eine Mapping-Tabelle aus `idLD` → `name` aller Einträge in `location_device`.
|
||||
|
||||
## Methode
|
||||
|
||||
- `GET`
|
||||
|
||||
## Rückgabe
|
||||
|
||||
```json
|
||||
{
|
||||
"12": "Hauptstation",
|
||||
"13": "Unterstation"
|
||||
}
|
||||
```
|
||||
|
||||
## Verhalten
|
||||
|
||||
- Antwort ist ein Key-Value-Objekt
|
||||
- Nutzt `reduce()` zur Map-Erstellung
|
||||
- Verwendet MySQL-Singleton-Pool
|
||||
|
||||
## Fehler
|
||||
|
||||
- 404: Wenn keine Daten vorhanden
|
||||
- 500: Datenbankfehler
|
||||
40
docs/pages/api/talas_v5_DB/station/getDevices.md
Normal file
40
docs/pages/api/talas_v5_DB/station/getDevices.md
Normal file
@@ -0,0 +1,40 @@
|
||||
<!-- /docs/pages/api/talas_v5_DB/device/getDevices.md -->
|
||||
|
||||
# 📦 getDevices.js
|
||||
|
||||
Gibt alle Geräte aus der `devices`-Tabelle zurück.
|
||||
|
||||
## Methode
|
||||
|
||||
- `POST`
|
||||
|
||||
## Request-Body
|
||||
|
||||
```json
|
||||
{
|
||||
"activeSystems": [1, 2, 3]
|
||||
}
|
||||
```
|
||||
|
||||
⚠️ Hinweis: Im aktuellen Code wird der Parameter `activeSystems` nicht verwendet!
|
||||
|
||||
## Rückgabe
|
||||
|
||||
- JSON-Array mit Geräteobjekten
|
||||
|
||||
## Beispielantwort
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "CPL V4.0",
|
||||
"idsystem_typ": 1
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Fehler
|
||||
|
||||
- 404: Keine Ergebnisse
|
||||
- 500: Datenbankfehler
|
||||
Reference in New Issue
Block a user