mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-18 19:13:17 +00:00
Merge pull request #5205 from pixelfed/staging
Update ApiV1Controller, fix support for notification filter types[]
This commit is contained in:
commit
19889d914e
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
if ($minId == $maxId) {
|
||||||
$minId = null;
|
$minId = null;
|
||||||
|
|
Loading…
Reference in a new issue