Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AnaLu602 committed Oct 7, 2023
1 parent 1912ea5 commit d610380
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions backend/app/app/api/api_v1/endpoints/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ def read_UE_distances(*,
raise HTTPException(status_code=404, detail="UE not found")
if not crud.user.is_superuser(current_user) and (UE.owner_id != current_user.id):
raise HTTPException(status_code=400, detail="Not enough permissions")

if retrieve_ue(supi) == None:
raise HTTPException(status_code=400, detail="The emulation needs to be ongoing")

return retrieve_ue_distances(supi)


Expand All @@ -66,6 +70,10 @@ def read_UE_losses(*,
raise HTTPException(status_code=404, detail="UE not found")
if not crud.user.is_superuser(current_user) and (UE.owner_id != current_user.id):
raise HTTPException(status_code=400, detail="Not enough permissions")

if retrieve_ue(supi) == None:
raise HTTPException(status_code=400, detail="The emulation needs to be ongoing")

return retrieve_ue_path_losses(supi)


Expand All @@ -81,6 +89,10 @@ def read_UE_rsrps(*,
raise HTTPException(status_code=404, detail="UE not found")
if not crud.user.is_superuser(current_user) and (UE.owner_id != current_user.id):
raise HTTPException(status_code=400, detail="Not enough permissions")

if retrieve_ue(supi) == None:
raise HTTPException(status_code=400, detail="The emulation needs to be ongoing")

return retrieve_ue_rsrps(supi)

@router.get("/{supi}/handovers")
Expand All @@ -95,4 +107,8 @@ def read_UE_handovers(*,
raise HTTPException(status_code=404, detail="UE not found")
if not crud.user.is_superuser(current_user) and (UE.owner_id != current_user.id):
raise HTTPException(status_code=400, detail="Not enough permissions")

if retrieve_ue(supi) == None:
raise HTTPException(status_code=400, detail="The emulation needs to be ongoing")

return retrieve_ue_handovers(supi)

0 comments on commit d610380

Please sign in to comment.