mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix: add availableForUsers condition from locationType in the location API endpoint
This commit is contained in:
parent
e21f12d96c
commit
1e99ca2ca5
@ -21,11 +21,14 @@ class LocationApiController extends ApiController
|
||||
{
|
||||
public function customizeQuery(string $action, Request $request, $query): void
|
||||
{
|
||||
$query->andWhere(
|
||||
$query->expr()->andX(
|
||||
$query
|
||||
->leftJoin('e.locationType', 'lt')
|
||||
->andWhere(
|
||||
$query->expr()->andX(
|
||||
$query->expr()->eq('e.availableForUsers', "'TRUE'"),
|
||||
$query->expr()->eq('lt.availableForUsers', "'TRUE'"),
|
||||
$query->expr()->eq('e.active', "'TRUE'"),
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user