updated
This commit is contained in:
@@ -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")
|
||||
|
@@ -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") {
|
||||
|
@@ -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 />
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user