Skip to content

Commit 086db52

Browse files
committed
add api filter
1 parent 69bf8ba commit 086db52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Api/Projection/UserProjection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
namespace App\Api\Projection;
66

7+
use ApiPlatform\Core\Annotation\ApiFilter;
78
use ApiPlatform\Core\Annotation\ApiProperty;
89
use ApiPlatform\Core\Annotation\ApiResource;
10+
use ApiPlatform\Core\Bridge\Elasticsearch\DataProvider\Filter\MatchFilter;
911
use Symfony\Component\Serializer\Annotation\Groups;
1012

1113
/**
@@ -26,6 +28,7 @@
2628
* normalizationContext={"groups"={"user:read"}},
2729
* denormalizationContext={"groups"={"user:write"}},
2830
* )
31+
* @ApiFilter(MatchFilter::class, properties={"email"})
2932
*/
3033
class UserProjection
3134
{

0 commit comments

Comments
 (0)