Skip to content

Commit

Permalink
feat: api to download submission from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
nrjadkry committed Dec 7, 2023
1 parent 00be10e commit bab038a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/backend/app/submission/submission_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ async def update_submission_cache(
content={"Message": f"Submission update process initiated"},
)

@router.post("/download_submission_from_cache")
async def download_submissions_from_cache(
project_id: int,
db: Session = Depends(database.get_db)
):

project = await project_crud.get_project(db, project_id)
s3_path = f"{settings.S3_DOWNLOAD_ROOT}/{settings.S3_BUCKET_NAME}/{project.organisation_id}/{project_id}/submission.json"
return s3_path


@router.get("/get_osm_xml/{project_id}")
async def get_osm_xml(
Expand Down

0 comments on commit bab038a

Please sign in to comment.