Node.js based forum software built for the modern web
refactor: events are returned inside post objects
Barış Soner Uşaklı3ab22c2c8c59
diff --git a/public/openapi/read/topic/topic_id.yaml b/public/openapi/read/topic/topic_id.yamlindex ded3e1f568..302d39dbcc 100644--- a/public/openapi/read/topic/topic_id.yaml+++ b/public/openapi/read/topic/topic_id.yaml@@ -50,19 +50,6 @@ get:type: arrayitems:$ref: ../../components/schemas/PostObject.yaml#/PostDataObject- events:- type: array- items:- type: object- properties:- type:- type: string- id:- type: number- timestamp:- type: number- timestampISO:- type: stringcategory:$ref: ../../components/schemas/CategoryObject.yaml#/CategoryObjecttagWhitelist:diff --git a/src/topics/index.js b/src/topics/index.jsindex 46483d441a..07600e6311 100644--- a/src/topics/index.js+++ b/src/topics/index.js@@ -192,7 +192,6 @@ Topics.getTopicWithPosts = async function (topicData, set, uid, start, stop, revtopicData.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