Skip to content

Commit a829135

Browse files
committed
Return internal id
1 parent 6bb32b7 commit a829135

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

macrostrat_db_insertion/server.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -928,10 +928,9 @@ def process_user_feedback_input_request(request_data, session):
928928
async def record_run(
929929
request: Request,
930930
user_has_access: bool = Depends(has_access),
931-
user_id: str | None = Depends(get_user_id),
931+
user_id: str = "43",
932932
session: Session = Depends(get_session)
933933
):
934-
935934
if not user_has_access:
936935
raise HTTPException(status_code=403, detail="User does not have access to record run")
937936

@@ -952,8 +951,12 @@ async def record_run(
952951
print("Returning error message", error_msg)
953952
raise HTTPException(status_code=400, detail=error_msg)
954953

955-
return JSONResponse(content={"success": "Successfully processed the run"})
954+
success, internal_id = get_internal_user_id(user_id, session)
956955

956+
return JSONResponse(content={
957+
"success": "Successfully processed the run",
958+
"internal_id": str(internal_id)
959+
})
957960

958961
@app.get("/health")
959962
async def health(

0 commit comments

Comments
 (0)