mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-24 21:30:15 +08:00
Better endpoint naming
This commit is contained in:
parent
e6fbc2bedf
commit
3e51671ff6
@ -87,11 +87,11 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
|
|
||||||
class PatchRoutes:
|
class PatchRoutes:
|
||||||
def __init__(self, routes):
|
def __init__(self, routes):
|
||||||
@routes.get("/test")
|
@routes.get("/extensions/example")
|
||||||
async def get(request):
|
async def get(request):
|
||||||
return web.Response(text="Hello World! This a test endpoint in example_node.py")
|
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):
|
async def post(request):
|
||||||
text_data = await request.text()
|
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}")
|
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