[API] Sorting user orders by order number

I did sorting user orders by order number.
This commit is contained in:
dawkaa 2023-04-26 18:01:48 +08:00
parent 8a30c98ea5
commit 76d51022f3
2 changed files with 10 additions and 0 deletions

View file

@ -22,6 +22,9 @@
<collectionOperation name="admin_get">
<attribute name="method">GET</attribute>
<attribute name="path">admin/orders</attribute>
<attribute name="filters">
<attribute>sylius.api.order_number_filter</attribute>
</attribute>
<attribute name="normalization_context">
<attribute name="groups">admin:order:read</attribute>
</attribute>

View file

@ -210,5 +210,12 @@
</argument>
<tag name="api_platform.filter" />
</service>
<service id="sylius.api.order_number_filter" parent="api_platform.doctrine.orm.order_filter" public="true">
<argument type="collection">
<argument key="number" />
</argument>
<tag name="api_platform.filter" />
</service>
</services>
</container>