Api v1.15.0 (#1584)

* fix(chalice): fixed sourcemaps endpoint
This commit is contained in:
Kraiem Taha Yassine 2023-10-27 15:25:18 +02:00 committed by GitHub
parent 1b8204428e
commit 248734a12d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -563,11 +563,7 @@ def delete_alert(projectId: int, alertId: int, _=Body(None),
@app_apikey.put('/{projectKey}/sourcemaps', tags=["sourcemaps"])
def sign_sourcemap_for_upload(projectKey: str, data: schemas.SourcemapUploadPayloadSchema = Body(...),
context: schemas.CurrentContext = Depends(OR_context)):
project_id = projects.get_by_project_key(project_key=projectKey)["projectId"]
if project_id is None:
return {"errors": ["Project not found."]}
return {"data": sourcemaps.presign_upload_urls(project_id=project_id, urls=data.urls)}
return {"data": sourcemaps.presign_upload_urls(project_id=context.project.project_id, urls=data.urls)}
@app.get('/config/weekly_report', tags=["weekly report config"])