Skip to content
Snippets Groups Projects
Commit 00fa50f0 authored by Xiao Gui's avatar Xiao Gui
Browse files

fix: add request optional param

parent 413a89d7
No related branches found
No related tags found
No related merge requests found
......@@ -162,9 +162,9 @@ class SaneUrlModel(BaseModel):
@router.post("/{short_id:str}")
async def post_short(short_id: str, saneurl: SaneUrlModel):
async def post_short(short_id: str, saneurl: SaneUrlModel, request:Request):
try:
data_proxy_store.set(short_id, saneurl.model_dump())
data_proxy_store.set(short_id, saneurl.model_dump(), request=request)
return Response(status_code=201)
except Exception as e:
raise HTTPException(500, str(e))
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment