mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-30 11:00:11 +08:00
Remove duplicated code in routes.py
(#8565)
* Update routes.py * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
56af40f5e3
commit
fd5aab10be
5
.changeset/slick-dancers-lie.md
Normal file
5
.changeset/slick-dancers-lie.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": minor
|
||||
---
|
||||
|
||||
feat:Remove duplicated code in `routes.py`
|
@ -382,7 +382,7 @@ class App(FastAPI):
|
||||
request=request, route_path="/", root_path=app.root_path
|
||||
)
|
||||
if (app.auth is None and app.auth_dependency is None) or user is not None:
|
||||
config = app.get_blocks().config
|
||||
config = blocks.config
|
||||
config = route_utils.update_root_in_config(config, root)
|
||||
elif app.auth_dependency:
|
||||
raise HTTPException(
|
||||
@ -392,7 +392,7 @@ class App(FastAPI):
|
||||
config = {
|
||||
"auth_required": True,
|
||||
"auth_message": blocks.auth_message,
|
||||
"space_id": app.get_blocks().space_id,
|
||||
"space_id": blocks.space_id,
|
||||
"root": root,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user