Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chennisden committed Jun 6, 2024
1 parent 3078b70 commit f158004
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/hooks/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class api {
}
public async getRobots(): Promise<Robot[]> {
try {
const response = await this.api.get("/robots");
const response = await this.api.get("/robots/");
return response.data;
} catch (error) {
if (axios.isAxiosError(error)) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Home = () => {
width: "100%",
}}
onClick={() => {
navigate("/robots/add");
navigate("/add");
}}
>
Make a Robot
Expand Down
4 changes: 2 additions & 2 deletions store/app/api/routers/part.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
logger = logging.getLogger(__name__)


@parts_router.get("/parts")
@parts_router.get("/")
async def list_parts(crud: Annotated[Crud, Depends(Crud.get)]) -> List[Part]:
return await crud.list_parts()


@parts_router.get("/parts/{part_id}")
@parts_router.get("/{part_id}")
async def get_part(part_id: str, crud: Annotated[Crud, Depends(Crud.get)]) -> Part | None:
return await crud.get_part(part_id)

0 comments on commit f158004

Please sign in to comment.