Data: Stations and pumping (the tracked stations, their position, pump.sh from the app); the weather of the station at Load
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eaa124f9f5
commit
c8c8c1587a
8 files changed
+261
-14
No files matched your search
@@ -77,6 +77,26 @@ def detectors(station_: str = Query(alias="station"), start: str = "", end: str
|
||||
return station.detectors(station_, start, end, targets)
|
||||
|
||||
|
||||
@app.get("/api/tracked")
|
||||
def tracked():
|
||||
return [{"serial": s, "position": p} for s, p in station.tracked().items()]
|
||||
|
||||
|
||||
@app.put("/api/tracked")
|
||||
def save_tracked(body: dict):
|
||||
return station.save_tracked(body.get("stations") or [])
|
||||
|
||||
|
||||
@app.get("/api/pump")
|
||||
def pumping():
|
||||
return station.pumping()
|
||||
|
||||
|
||||
@app.post("/api/pump")
|
||||
def pump(body: dict):
|
||||
return station.pump(body)
|
||||
|
||||
|
||||
@app.get("/api/labels")
|
||||
def labels(station_: str = Query(alias="station"), folder: str = "manual"):
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user