API - threads.json last_modified is now really the timestamp of the last post, put bump time in a new field 'bump'

This commit is contained in:
towards-a-new-leftypol 2024-03-31 21:19:12 +00:00
parent 623e5929b6
commit 93b8d216b1
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class Api {
$this->threadsPageFields = array(
'id' => 'no',
'bump' => 'last_modified',
'bump' => 'bump',
'board' => 'board',
);
@ -197,6 +197,7 @@ class Api {
$ips[] = $p->ip;
}
$apiPosts['posts'][0]['unique_ips'] = count(array_unique($ips));
$apiPosts['posts'][0]['last_modified'] = (empty($thread->posts) ? $thread : end($thread->posts))->time;
return $apiPosts;
}