mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-12 07:10:52 +08:00
Better endpoint naming
This commit is contained in:
parent
e6fbc2bedf
commit
3e51671ff6
@ -87,11 +87,11 @@ NODE_CLASS_MAPPINGS = {
|
||||
|
||||
class PatchRoutes:
|
||||
def __init__(self, routes):
|
||||
@routes.get("/test")
|
||||
@routes.get("/extensions/example")
|
||||
async def get(request):
|
||||
return web.Response(text="Hello World! This a test endpoint in example_node.py")
|
||||
|
||||
@routes.post("/test")
|
||||
@routes.post("/extensions/example")
|
||||
async def post(request):
|
||||
text_data = await request.text()
|
||||
return web.Response(text=f"Hello World! This a test endpoint in example_node.py\n\nYour request body: {text_data}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user