Skip to content

Commit

Permalink
feat: added users authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradip-p committed Oct 14, 2024
1 parent 839f164 commit c7df31d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
1 change: 1 addition & 0 deletions src/backend/app/projects/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ async def process_imagery(
tags=["Image Processing"],
)
async def get_assets_info(
user_data: Annotated[AuthUser, Depends(login_required)],
db: Annotated[Connection, Depends(database.get_db)],
project: Annotated[
project_schemas.DbProject, Depends(project_deps.get_project_by_id)
Expand Down
18 changes: 0 additions & 18 deletions src/backend/app/projects/project_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,6 @@ class TaskOut(BaseModel):
image_count: Optional[int] = None
assets_url: Optional[str] = None

# @model_validator(mode="after")
# def set_assets_url(cls, values):
# """Set image_url and image count before rendering the model."""
# task_id = values.id
# project_id = values.project_id

# if task_id and project_id:
# data = project_logic.get_project_info_from_s3(project_id, task_id)
# if data:
# return values.copy(
# update={
# "assets_url": data.assets_url,
# "image_count": data.image_count,
# }
# )

# return values


class DbProject(BaseModel):
"""Project model for extracting from database."""
Expand Down

0 comments on commit c7df31d

Please sign in to comment.