Add support for since_id field into the timeline API
This commit is contained in:
parent
cbf55241a3
commit
9a6ebc94c4
|
@ -139,11 +139,12 @@ class BaseApi extends BaseModule
|
||||||
$condition = DBA::mergeConditions($condition, ["`$order_field` < ?", DateTimeFormat::convert($request['max_id'], DateTimeFormat::MYSQL)]);
|
$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'])) {
|
if (!empty($request['min_id'])) {
|
||||||
$condition = DBA::mergeConditions($condition, ["`$order_field` > ?", DateTimeFormat::convert($request['min_id'], DateTimeFormat::MYSQL)]);
|
$condition = DBA::mergeConditions($condition, ["`$order_field` > ?", DateTimeFormat::convert($request['min_id'], DateTimeFormat::MYSQL)]);
|
||||||
|
|
||||||
$params['order'] = [$order_field];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue