mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Allow to delete parts.
This commit is contained in:
parent
0ff9e3813a
commit
94ed78f66d
4 changed files with 55 additions and 8 deletions
|
@ -285,6 +285,10 @@ class EntityURLGenerator
|
|||
|
||||
public function deleteURL($entity) : string
|
||||
{
|
||||
if ($entity instanceof Part) {
|
||||
return $this->urlGenerator->generate('part_delete', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof AttachmentType) {
|
||||
return $this->urlGenerator->generate('attachment_type_delete', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue