From 5f803d0b311adbb334b6ebb009fbe90d2d583609 Mon Sep 17 00:00:00 2001 From: Dennis Chen Date: Wed, 5 Jun 2024 13:27:22 -0700 Subject: [PATCH] fix add_robot -> add/robot --- frontend/src/hooks/api.tsx | 2 +- frontend/src/pages/Home.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/hooks/api.tsx b/frontend/src/hooks/api.tsx index e5019045..510406c3 100644 --- a/frontend/src/hooks/api.tsx +++ b/frontend/src/hooks/api.tsx @@ -102,7 +102,7 @@ class api { public async addRobot(robot: Robot): Promise { const s = robot.name; try { - await this.api.post("/add_robot/", robot); + await this.api.post("/add/robot/", robot); } catch (error) { if (axios.isAxiosError(error)) { console.error("Error adding robot:", error.response?.data); diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index 2b8dfa59..ebd47b67 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -40,7 +40,7 @@ const Home = () => { width: "100%", }} onClick={() => { - navigate("/add_robot"); + navigate("/add/robot"); }} > Make a Robot