From 9e13a225e5c6e3f43d13e0a555127ec7dd0063ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Otgaar?= Date: Tue, 9 Dec 2025 13:44:17 +0100 Subject: [PATCH 1/2] chore: adjust single string line to fetch correct gestures --- src/pages/GesturePage/GesturePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/GesturePage/GesturePage.tsx b/src/pages/GesturePage/GesturePage.tsx index 76a0817..15697d5 100644 --- a/src/pages/GesturePage/GesturePage.tsx +++ b/src/pages/GesturePage/GesturePage.tsx @@ -14,7 +14,7 @@ export default function GesturePage() { const res = await fetch("http://localhost:8000/robot/get_available_gesture_tags"); if (!res.ok) throw new Error("Failed communicating with the backend."); const jsonRes = await res.json(); - setTags(jsonRes["tags"]); + setTags(jsonRes["available_gesture_tags"]); } catch (err) { console.error("Failed to fetch tags:", err); } From efa43f01900549b34b2e34d373266a89ebda0a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Otgaar?= Date: Mon, 15 Dec 2025 12:32:58 +0100 Subject: [PATCH 2/2] fix: use correct endpoints, origin of change from cb. ref: N25B-334 --- src/pages/GesturePage/GesturePage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/GesturePage/GesturePage.tsx b/src/pages/GesturePage/GesturePage.tsx index 15697d5..45d9cab 100644 --- a/src/pages/GesturePage/GesturePage.tsx +++ b/src/pages/GesturePage/GesturePage.tsx @@ -11,7 +11,9 @@ export default function GesturePage() { async function getTags() { try { - const res = await fetch("http://localhost:8000/robot/get_available_gesture_tags"); + // You can optionally use a query parameter: `commands/gesture/tags/?count=`. + // This will yield a list of tags with that count. + const res = await fetch("http://localhost:8000/robot/commands/gesture/tags/"); if (!res.ok) throw new Error("Failed communicating with the backend."); const jsonRes = await res.json(); setTags(jsonRes["available_gesture_tags"]); @@ -29,7 +31,7 @@ export default function GesturePage() { const gesture = { endpoint: "actuate/gesture/tag", data: selectedTag }; try { - const res = await fetch("http://localhost:8000/robot/command", { + const res = await fetch("http://localhost:8000/robot/command/gesture", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(gesture),