Set the "Link" header

This commit is contained in:
Michael 2021-06-16 15:02:33 +00:00
parent d4f883a376
commit 78d4aff878
18 changed files with 98 additions and 18 deletions

View file

@ -128,6 +128,7 @@ class Notifications extends BaseApi
$notify = DBA::select('notification', ['id'], $condition, $params);
while ($notification = DBA::fetch($notify)) {
self::setBoundaries($notification['id']);
$entry = DI::mstdnNotification()->createFromNotificationId($notification['id']);
if (!empty($entry)) {
$notifications[] = $entry;
@ -138,6 +139,7 @@ class Notifications extends BaseApi
array_reverse($notifications);
}
self::setLinkHeader();
System::jsonExit($notifications);
}
}