wip: submit watchlist triggers live

This commit is contained in:
Vincent
2025-05-23 13:59:55 +02:00
parent 130ce1bbac
commit 596b9b548d
3 changed files with 28 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Link;
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Put;
use App\Config\TriggerAction;
use App\Repository\EventTriggerRepository;
@@ -24,11 +25,8 @@ use Symfony\Component\Serializer\Attribute\Groups;
'watchListId' => new Link(fromProperty: 'token', toProperty: 'watchList', fromClass: WatchList::class),
],
),
new Put(
uriTemplate: '/watchlists/{watchListId}/triggers',
uriVariables: [
'watchListId' => new Link(fromProperty: 'token', toProperty: 'watchList', fromClass: WatchList::class),
],
new Post(
security: 'true', // FIXME check the submitted object
),
new Delete(),
],