mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: remove exits check
This commit is contained in:
@@ -111,10 +111,8 @@ function renderTimeago(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Events.get = async (tid, uid, reverse = false) => {
|
Events.get = async (tid, uid, reverse = false) => {
|
||||||
const topics = require('.');
|
if (!tid) {
|
||||||
|
return [];
|
||||||
if (!await topics.exists(tid)) {
|
|
||||||
throw new Error('[[error:no-topic]]');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let eventIds = await db.getSortedSetRangeWithScores(`topic:${tid}:events`, 0, -1);
|
let eventIds = await db.getSortedSetRangeWithScores(`topic:${tid}:events`, 0, -1);
|
||||||
|
|||||||
Reference in New Issue
Block a user