Skip to content

Commit

Permalink
fix: added a param name on auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradip-p committed Jul 6, 2024
1 parent 4d8a0be commit d7e276c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ async def create_project_with_project_info(
},
)

if not project_id:
raise HTTPException(status_code=500, detail="Project could not be created")
# Fetch the newly created project using the returned ID
select_query = f"""
SELECT id, name, short_description, description, per_task_instructions, outline
Expand Down
8 changes: 4 additions & 4 deletions src/backend/app/projects/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
def delete_project_by_id(
project_id: uuid.UUID,
db: Session = Depends(database.get_db),
AuthUser=Depends(login_required),
user: AuthUser = Depends(login_required)
):
"""
Delete a project by its ID, along with all associated tasks.
Expand Down Expand Up @@ -93,7 +93,7 @@ async def upload_project_task_boundaries(
project_id: uuid.UUID,
task_geojson: UploadFile = File(...),
db: Database = Depends(database.encode_db),
AuthUser=Depends(login_required),
user: AuthUser = Depends(login_required)
):
"""Set project task boundaries using split GeoJSON from frontend.
Expand Down Expand Up @@ -128,8 +128,8 @@ async def upload_project_task_boundaries(
async def preview_split_by_square(
project_geojson: UploadFile = File(...),
dimension: int = Form(100),
AuthUser=(login_required),
):
user: AuthUser = Depends(login_required)
):
"""Preview splitting by square."""

# Validating for .geojson File.
Expand Down

0 comments on commit d7e276c

Please sign in to comment.