wip: refactor watchlist update and watchlist trigger URI for upsert

This commit is contained in:
Vincent
2025-05-06 14:02:23 +02:00
parent 01c8c72fe6
commit a9ed531921
4 changed files with 93 additions and 156 deletions

View File

@@ -79,14 +79,12 @@ use Symfony\Component\Uid\Uuid;
name: 'calendar'
),
new Post(
routeName: 'watchlist_create',
normalizationContext: ['groups' => 'watchlist:list'],
denormalizationContext: ['groups' => 'watchlist:create'],
name: 'create',
processor: WatchListUpdateProcessor::class,
),
new Put(
routeName: 'watchlist_update',
normalizationContext: ['groups' => 'watchlist:item'],
denormalizationContext: ['groups' => ['watchlist:create', 'watchlist:token']],
security: 'object.user == user',