feat: update API endpoints

This commit is contained in:
Maël Gangloff
2024-07-17 14:00:46 +02:00
parent 36a76f2876
commit c9b9cdad59
6 changed files with 25 additions and 56 deletions

View File

@@ -2,24 +2,10 @@
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Repository\EntityEventRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EntityEventRepository::class)]
#[ApiResource(
operations: [
new Get(
uriTemplate: '/events/entity/{id}',
shortName: 'Entity Event',
class: EntityEvent::class,
normalizationContext: [
'groups' => ['event:list']
]
)
]
)]
class EntityEvent extends Event
{