Add support for since_id field into the timeline API

This commit is contained in:
Hank Grabowski 2023-02-23 07:04:12 -05:00
parent cbf55241a3
commit 9a6ebc94c4

View File

@ -139,11 +139,12 @@ class BaseApi extends BaseModule
$condition = DBA::mergeConditions($condition, ["`$order_field` < ?", DateTimeFormat::convert($request['max_id'], DateTimeFormat::MYSQL)]);
}
if (!empty($request['since_id'])) {
$condition = DBA::mergeConditions($condition, ["`$order_field` > ?", DateTimeFormat::convert($request['since_id'], DateTimeFormat::MYSQL)]);
}
if (!empty($request['min_id'])) {
$condition = DBA::mergeConditions($condition, ["`$order_field` > ?", DateTimeFormat::convert($request['min_id'], DateTimeFormat::MYSQL)]);
$params['order'] = [$order_field];
}
}