1
0
Fork 0

Update v1 notifications api, fix optional params

This commit is contained in:
Daniel Supernault 2020-03-18 16:53:54 -06:00
parent 8b9faf3179
commit 4e3c952cf3
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 3 additions and 1 deletions

View File

@ -1226,7 +1226,9 @@ class ApiV1Controller extends Controller
$min = $request->input('min_id'); $min = $request->input('min_id');
$max = $request->input('max_id'); $max = $request->input('max_id');
abort_if(!$since && !$min && !$max, 400); if(!$since && !$min && !$max) {
$min = 1;
}
$dir = $since ? '>' : ($min ? '>=' : '<'); $dir = $since ? '>' : ($min ? '>=' : '<');
$id = $since ?? $min ?? $max; $id = $since ?? $min ?? $max;