From 3e51671ff63f911d18f0a7d488e71459e67506b1 Mon Sep 17 00:00:00 2001 From: Hacker 17082006 Date: Wed, 15 Mar 2023 22:33:57 +0700 Subject: [PATCH] Better endpoint naming --- custom_nodes/example_node.py.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_nodes/example_node.py.example b/custom_nodes/example_node.py.example index 24aaada2e..a0bffdfb9 100644 --- a/custom_nodes/example_node.py.example +++ b/custom_nodes/example_node.py.example @@ -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}")