Update ApiV1Controller, fix support for notification filter types[]

This commit is contained in:
Daniel Supernault 2024-07-02 01:00:31 -06:00
parent 2b9586fce1
commit f61bbecaa9
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -2335,7 +2335,12 @@ class ApiV1Controller extends Controller
}
}
if ($request->has('types')) {
$typesParams = collect($types)->implode('&types[]=');
$baseUrl = config('app.url').'/api/v1/notifications?types[]='.$typesParams.'&limit='.$ogLimit.'&';
} else {
$baseUrl = config('app.url').'/api/v1/notifications?limit='.$ogLimit.'&';
}
if ($minId == $maxId) {
$minId = null;