Skip to content

Commit e45ce2e

Browse files
fix redirect function
1 parent 14cdf93 commit e45ce2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ async def dynamic_redirect(request: Request, key: str):
153153
collection = db.route_handlers
154154
document = await collection.find_one({"key": key})
155155
if document:
156-
return redirect(execute_async_code(document['handler_function']))
156+
return RedirectResponse(url=execute_async_code(document['handler_function']))
157157
return "Handler function not found.", 404
158158

159159
# Run FastAPI with Uvicorn

0 commit comments

Comments
 (0)