mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: events are returned inside post objects
to load all events of a topic use api/v3/topics/:tid/events
This commit is contained in:
@@ -50,19 +50,6 @@ get:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../components/schemas/PostObject.yaml#/PostDataObject
|
||||
events:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
id:
|
||||
type: number
|
||||
timestamp:
|
||||
type: number
|
||||
timestampISO:
|
||||
type: string
|
||||
category:
|
||||
$ref: ../../components/schemas/CategoryObject.yaml#/CategoryObject
|
||||
tagWhitelist:
|
||||
|
||||
@@ -192,7 +192,6 @@ Topics.getTopicWithPosts = async function (topicData, set, uid, start, stop, rev
|
||||
|
||||
topicData.thumbs = thumbs[0];
|
||||
topicData.posts = posts;
|
||||
topicData.events = events;
|
||||
topicData.posts.forEach((p) => {
|
||||
p.events = events.filter(
|
||||
event => event.timestamp >= p.eventStart && event.timestamp < p.eventEnd
|
||||
|
||||
Reference in New Issue
Block a user