Skip to content

Commit

Permalink
water level settings end points #2
Browse files Browse the repository at this point in the history
  • Loading branch information
hcwinsemius committed Jan 15, 2025
1 parent 529f852 commit 20a238e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nodeorc_api/crud/disk_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ def get(db: Session):
# there should always only be one disk management config. Hence retrieve the first.
dms = db.query(models.DiskManagement)
if dms.count() > 0:
return db.query(models.DiskManagement).first()
return dms.first()
3 changes: 2 additions & 1 deletion nodeorc_api/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from fastapi import FastAPI, Depends, Request
from fastapi.middleware.cors import CORSMiddleware

from nodeorc_api.routers import device, video, disk_management
from nodeorc_api.routers import device, video, disk_management, water_level
app = FastAPI()

# origins = ["http://localhost:5173"]
Expand All @@ -20,6 +20,7 @@
app.include_router(device.router)
app.include_router(video.router)
app.include_router(disk_management.router)
app.include_router(water_level.router)

@app.get("/")
async def root():
Expand Down

0 comments on commit 20a238e

Please sign in to comment.