sql_app: remove api key from some functions for testing
Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
parent
ede2b56b71
commit
19ef5cebbf
@ -309,13 +309,11 @@ def get_room_data(db: Session = Depends(get_db)):
|
|||||||
|
|
||||||
@app.get("/admin/roominfo/history/sensors", tags=['Admin'])
|
@app.get("/admin/roominfo/history/sensors", tags=['Admin'])
|
||||||
def get_all_sensor_history(skip: int = 0, limit: int = 100,
|
def get_all_sensor_history(skip: int = 0, limit: int = 100,
|
||||||
api_key: APIKey = Depends(auth_helper.valid_api_key),
|
|
||||||
db: Session = Depends(get_db)):
|
db: Session = Depends(get_db)):
|
||||||
return crud.get_sensor_data_for_room(db, skip, limit)
|
return crud.get_sensor_data_for_room(db, skip, limit)
|
||||||
|
|
||||||
@app.post("/admin/roominfo/accesslog",response_model=List[schemas.DoorAccessLog], tags=['Admin'])
|
@app.post("/admin/roominfo/accesslog",response_model=List[schemas.DoorAccessLog], tags=['Admin'])
|
||||||
def get_access_log_for_door(request : schemas.AccessLogRequest,
|
def get_access_log_for_door(request : schemas.AccessLogRequest,
|
||||||
api_key: APIKey = Depends(auth_helper.valid_api_key),
|
|
||||||
db : Session = Depends(get_db)):
|
db : Session = Depends(get_db)):
|
||||||
device: models.IotEntity = crud.get_iot_entity(db, request.iot_id)
|
device: models.IotEntity = crud.get_iot_entity(db, request.iot_id)
|
||||||
if not device: raise HTTPException(status.HTTP_404_NOT_FOUND, detail="Iot Entity not found")
|
if not device: raise HTTPException(status.HTTP_404_NOT_FOUND, detail="Iot Entity not found")
|
||||||
|
Loading…
Reference in New Issue
Block a user