diff --git a/public/openapi/components/schemas/PostObject.yaml b/public/openapi/components/schemas/PostObject.yaml index 526bc2c75e..5ff918cd7f 100644 --- a/public/openapi/components/schemas/PostObject.yaml +++ b/public/openapi/components/schemas/PostObject.yaml @@ -74,9 +74,6 @@ PostObject: description: A category identifier slug: type: string - thumb: - type: string - description: An uploaded topic thumbnail deleted: type: number postcount: diff --git a/public/openapi/components/schemas/TopicObject.yaml b/public/openapi/components/schemas/TopicObject.yaml index 6f2c45cfcf..10453fe22b 100644 --- a/public/openapi/components/schemas/TopicObject.yaml +++ b/public/openapi/components/schemas/TopicObject.yaml @@ -41,9 +41,6 @@ TopicObject: type: number locked: type: number - thumb: - type: string - description: An uploaded topic thumbnail pinned: type: number description: Whether or not this particular topic is pinned to the top of the @@ -224,6 +221,8 @@ TopicObject: description: HTML injected into the theme index: type: number + thumb: + type: string required: - tid - uid diff --git a/public/openapi/read/topic/tid/id.yaml b/public/openapi/read/topic/tid/id.yaml index fab2532476..cdc638a1f5 100644 --- a/public/openapi/read/topic/tid/id.yaml +++ b/public/openapi/read/topic/tid/id.yaml @@ -42,9 +42,6 @@ get: type: number viewcount: type: number - thumb: - type: string - description: An uploaded topic thumbnail deleted: type: number locked: diff --git a/public/openapi/read/topic/topic_id.yaml b/public/openapi/read/topic/topic_id.yaml index d293d37ce5..c55c6888cd 100644 --- a/public/openapi/read/topic/topic_id.yaml +++ b/public/openapi/read/topic/topic_id.yaml @@ -53,9 +53,6 @@ get: type: number viewcount: type: number - thumb: - type: string - description: An uploaded topic thumbnail postercount: type: number description: The number of unique users who made a post in this topic diff --git a/public/openapi/read/unread.yaml b/public/openapi/read/unread.yaml index 9af7956705..a5fe83348e 100644 --- a/public/openapi/read/unread.yaml +++ b/public/openapi/read/unread.yaml @@ -49,9 +49,6 @@ get: type: number viewcount: type: number - thumb: - type: string - description: An uploaded topic thumbnail postercount: type: number teaserPid: diff --git a/src/topics/data.js b/src/topics/data.js index d33ddb29d0..720d2e63ad 100644 --- a/src/topics/data.js +++ b/src/topics/data.js @@ -98,7 +98,9 @@ function modifyTopic(topic, fields) { escapeTitle(topic); - topic.thumb = validator.escape(String(topic.thumb)) || ''; + if (topic.hasOwnProperty('thumb')) { + topic.thumb = validator.escape(String(topic.thumb)); + } if (topic.hasOwnProperty('timestamp')) { topic.timestampISO = utils.toISOString(topic.timestamp);