From 3b39a2a2e58d762c6e0ea22b8de397fe3a46a46a Mon Sep 17 00:00:00 2001 From: Philip Cheung Date: Mon, 28 Oct 2024 10:07:54 +0800 Subject: [PATCH] updated --- backend/app/api/routes/organ.py | 4 ++-- frontend/src/components/Common/DeleteAlert.tsx | 2 +- frontend/src/routes/_layout/organ.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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} - + ))} @@ -152,7 +152,7 @@ function Organ() { Electric organ Management - +