Update ApiV1Controller, fix support for notification filter types[]

pull/5205/head
Daniel Supernault 10 months ago
parent 2b9586fce1
commit f61bbecaa9
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -2335,7 +2335,12 @@ class ApiV1Controller extends Controller
}
}
$baseUrl = config('app.url').'/api/v1/notifications?limit='.$ogLimit.'&';
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;

Loading…
Cancel
Save