renamed endpoints to make it more uniform
This commit is contained in:
parent
0721edd431
commit
71e89ed5e6
1 changed files with 1 additions and 1 deletions
2
app.py
2
app.py
|
@ -128,7 +128,7 @@ def create_default_zone(session: Session, device_id: int) -> None:
|
||||||
|
|
||||||
|
|
||||||
# ---------- routes ----------
|
# ---------- routes ----------
|
||||||
@app.post("/api/device", response_model=NetBritePublic)
|
@app.post("/api/devices", response_model=NetBritePublic)
|
||||||
def create_device(device: NetBriteBase, session: SessionDep):
|
def create_device(device: NetBriteBase, session: SessionDep):
|
||||||
if session.exec(
|
if session.exec(
|
||||||
select(NetBriteDB).where(NetBriteDB.address == device.address)
|
select(NetBriteDB).where(NetBriteDB.address == device.address)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue