mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update ApiController
This commit is contained in:
parent
9fc9058aa0
commit
9a50a6f627
1 changed files with 2 additions and 2 deletions
|
@ -1164,14 +1164,14 @@ class ApiV1Controller extends Controller
|
||||||
$id = $min ?? $max;
|
$id = $min ?? $max;
|
||||||
$notifications = Notification::whereProfileId($pid)
|
$notifications = Notification::whereProfileId($pid)
|
||||||
->whereDate('created_at', '>', $timeago)
|
->whereDate('created_at', '>', $timeago)
|
||||||
->latest()
|
|
||||||
->where('id', $dir, $id)
|
->where('id', $dir, $id)
|
||||||
|
->orderByDesc('created_at')
|
||||||
->limit($limit)
|
->limit($limit)
|
||||||
->get();
|
->get();
|
||||||
} else {
|
} else {
|
||||||
$notifications = Notification::whereProfileId($pid)
|
$notifications = Notification::whereProfileId($pid)
|
||||||
->whereDate('created_at', '>', $timeago)
|
->whereDate('created_at', '>', $timeago)
|
||||||
->latest()
|
->orderByDesc('created_at')
|
||||||
->simplePaginate($limit);
|
->simplePaginate($limit);
|
||||||
}
|
}
|
||||||
$resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer());
|
$resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer());
|
||||||
|
|
Loading…
Reference in a new issue