Create gender API and adjust serialization of gender property

This commit is contained in:
2024-10-01 11:41:19 +02:00
parent 34e2a26d1e
commit 2eb686ffdb
5 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
<?php
namespace Chill\MainBundle\Controller;
use Chill\MainBundle\CRUD\Controller\ApiController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class GenderApiController extends ApiController
{
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format)
{
return $query->addOrderBy('e.order', 'ASC');
}
}