Merge pull request #5205 from pixelfed/staging

Update ApiV1Controller, fix support for notification filter types[]
pull/5259/head
daniel 8 months ago committed by GitHub
commit 19889d914e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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