Skip to content

Commit a3b3ef9

Browse files
authored
[Bug] Fixed dynamic filters for start_at and end_at in ListResults API (alexjustesen#1998)
1 parent 840e87f commit a3b3ef9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/Http/Controllers/Api/V1/ListResults.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,16 @@ public function __invoke(Request $request)
4343
AllowedFilter::exact('healthy')->nullable(),
4444
AllowedFilter::exact('status'),
4545
AllowedFilter::exact('scheduled'),
46-
AllowedFilter::operator('created_at', FilterOperator::DYNAMIC),
47-
AllowedFilter::operator('updated_at', FilterOperator::DYNAMIC),
46+
AllowedFilter::operator(
47+
name: 'start_at',
48+
internalName: 'created_at',
49+
filterOperator: FilterOperator::DYNAMIC,
50+
),
51+
AllowedFilter::operator(
52+
name: 'end_at',
53+
internalName: 'created_at',
54+
filterOperator: FilterOperator::DYNAMIC,
55+
),
4856
])
4957
->allowedSorts([
5058
'ping',

0 commit comments

Comments
 (0)