fix: use correct endpoints, origin of change from cb.
ref: N25B-334
This commit is contained in:
@@ -11,7 +11,9 @@ export default function GesturePage() {
|
|||||||
|
|
||||||
async function getTags() {
|
async function getTags() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch("http://localhost:8000/robot/get_available_gesture_tags");
|
// You can optionally use a query parameter: `commands/gesture/tags/?count=<number>`.
|
||||||
|
// 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.");
|
if (!res.ok) throw new Error("Failed communicating with the backend.");
|
||||||
const jsonRes = await res.json();
|
const jsonRes = await res.json();
|
||||||
setTags(jsonRes["available_gesture_tags"]);
|
setTags(jsonRes["available_gesture_tags"]);
|
||||||
@@ -29,7 +31,7 @@ export default function GesturePage() {
|
|||||||
const gesture = { endpoint: "actuate/gesture/tag", data: selectedTag };
|
const gesture = { endpoint: "actuate/gesture/tag", data: selectedTag };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetch("http://localhost:8000/robot/command", {
|
const res = await fetch("http://localhost:8000/robot/command/gesture", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify(gesture),
|
body: JSON.stringify(gesture),
|
||||||
|
|||||||
Reference in New Issue
Block a user