Revert "fix(spec): always show thumb in topic response"

This reverts commit 493c568a75.
This commit is contained in:
Julian Lam
2020-11-24 14:26:47 -05:00
parent 493c568a75
commit 90434a4668
6 changed files with 5 additions and 16 deletions

View File

@@ -74,9 +74,6 @@ PostObject:
description: A category identifier
slug:
type: string
thumb:
type: string
description: An uploaded topic thumbnail
deleted:
type: number
postcount:

View File

@@ -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

View File

@@ -42,9 +42,6 @@ get:
type: number
viewcount:
type: number
thumb:
type: string
description: An uploaded topic thumbnail
deleted:
type: number
locked:

View File

@@ -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

View File

@@ -49,9 +49,6 @@ get:
type: number
viewcount:
type: number
thumb:
type: string
description: An uploaded topic thumbnail
postercount:
type: number
teaserPid:

View File

@@ -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);