fix: update API routes for sniffer and bridge operations for consistency
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 7s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 7s
This commit is contained in:
@@ -350,7 +350,7 @@ def full_state(
|
||||
"bridges": get_bridges(), # uses NDB internally
|
||||
}
|
||||
|
||||
@router.post("/create")
|
||||
@router.post("/bridge/create")
|
||||
def create_bridge(req: BridgeCreateRequest, ip: IPRoute = Depends(get_iproute)):
|
||||
if bridge_exists(req.name, ip):
|
||||
raise HTTPException(400, f"Bridge {req.name} already exists")
|
||||
@@ -382,7 +382,7 @@ def create_bridge(req: BridgeCreateRequest, ip: IPRoute = Depends(get_iproute)):
|
||||
}
|
||||
|
||||
|
||||
@router.post("/remove")
|
||||
@router.post("/bridge/remove")
|
||||
def remove_bridge(req: BridgeRemoveRequest, ip: IPRoute = Depends(get_iproute)):
|
||||
if not bridge_exists(req.name, ip):
|
||||
raise HTTPException(404, f"Bridge {req.name} not found")
|
||||
|
||||
Reference in New Issue
Block a user