Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
d7f09642
Unverified
Commit
d7f09642
authored
Jun 19, 2024
by
Chenlei Hu
Committed by
GitHub
Jun 19, 2024
Browse files
Fix routes (#3790)
parent
028a583b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
server.py
server.py
+4
-2
No files found.
server.py
View file @
d7f09642
...
@@ -538,8 +538,10 @@ class PromptServer():
...
@@ -538,8 +538,10 @@ class PromptServer():
# prefix are supported.
# prefix are supported.
api_routes
=
web
.
RouteTableDef
()
api_routes
=
web
.
RouteTableDef
()
for
route
in
self
.
routes
:
for
route
in
self
.
routes
:
assert
isinstance
(
route
,
web
.
RouteDef
)
# Custom nodes might add extra static routes. Only process non-static
api_routes
.
route
(
route
.
method
,
"/api"
+
route
.
path
)(
route
.
handler
,
**
route
.
kwargs
)
# routes to add /api prefix.
if
isinstance
(
route
,
web
.
RouteDef
):
api_routes
.
route
(
route
.
method
,
"/api"
+
route
.
path
)(
route
.
handler
,
**
route
.
kwargs
)
self
.
app
.
add_routes
(
api_routes
)
self
.
app
.
add_routes
(
api_routes
)
self
.
app
.
add_routes
(
self
.
routes
)
self
.
app
.
add_routes
(
self
.
routes
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment