mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
change from/to
This commit is contained in:
@@ -101,10 +101,10 @@ events.log = async function (data) {
|
|||||||
events.getEvents = async function (filter, start, stop, from, to) {
|
events.getEvents = async function (filter, start, stop, from, to) {
|
||||||
// from/to optional
|
// from/to optional
|
||||||
if (from === undefined) {
|
if (from === undefined) {
|
||||||
from = 0;
|
from = '-inf';
|
||||||
}
|
}
|
||||||
if (to === undefined) {
|
if (to === undefined) {
|
||||||
to = Date.now();
|
to = '+inf';
|
||||||
}
|
}
|
||||||
|
|
||||||
const eids = await db.getSortedSetRevRangeByScore(`events:time${filter ? `:${filter}` : ''}`, start, stop - start + 1, to, from);
|
const eids = await db.getSortedSetRevRangeByScore(`events:time${filter ? `:${filter}` : ''}`, start, stop - start + 1, to, from);
|
||||||
|
|||||||
Reference in New Issue
Block a user