diff --git a/backend/app/api/routes/organ.py b/backend/app/api/routes/organ.py index 66de563..d8071b1 100644 --- a/backend/app/api/routes/organ.py +++ b/backend/app/api/routes/organ.py @@ -91,8 +91,8 @@ async def delete_organ( """ organ = session.get(Organ, id) if not organ: - raise HTTPException(status_code=404, detail="aboutUs not found") + raise HTTPException(status_code=404, detail="Organ not found") await del_picture(organ.image) session.delete(organ) session.commit() - return Message(message="aboutUs deleted successfully") + return Message(message="Organ deleted successfully") diff --git a/frontend/src/components/Common/DeleteAlert.tsx b/frontend/src/components/Common/DeleteAlert.tsx index 71c0086..1d2df84 100644 --- a/frontend/src/components/Common/DeleteAlert.tsx +++ b/frontend/src/components/Common/DeleteAlert.tsx @@ -86,7 +86,7 @@ const Delete = ({ type, id, isOpen, onClose }: DeleteProps) => { } else if (type === "AboutUs") { key = "aboutUs" } else if(type === "Organ"){ - key = "organs" + key = "organ" } else if (type === "Course") { key = "courses" } else if (type === "Image") { diff --git a/frontend/src/routes/_layout/organ.tsx b/frontend/src/routes/_layout/organ.tsx index 875a9e4..f50a415 100644 --- a/frontend/src/routes/_layout/organ.tsx +++ b/frontend/src/routes/_layout/organ.tsx @@ -117,7 +117,7 @@ function OrganTable() { {organ.index} </Td> <Td> - <ActionsMenu type={"AboutUs"} value={organ} /> + <ActionsMenu type={"Organ"} value={organ} /> </Td> </Tr> ))} @@ -152,7 +152,7 @@ function Organ() { Electric organ Management </Heading> - <Navbar type={"AboutUs"} addModalAs={AddOrgan} /> + <Navbar type={"Organ"} addModalAs={AddOrgan} /> <OrganTable />