mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 21:30:30 +01:00
fix(spec): always show thumb in topic response
This commit is contained in:
@@ -74,6 +74,9 @@ PostObject:
|
||||
description: A category identifier
|
||||
slug:
|
||||
type: string
|
||||
thumb:
|
||||
type: string
|
||||
description: An uploaded topic thumbnail
|
||||
deleted:
|
||||
type: number
|
||||
postcount:
|
||||
|
||||
@@ -41,6 +41,9 @@ 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
|
||||
@@ -221,8 +224,6 @@ TopicObject:
|
||||
description: HTML injected into the theme
|
||||
index:
|
||||
type: number
|
||||
thumb:
|
||||
type: string
|
||||
required:
|
||||
- tid
|
||||
- uid
|
||||
|
||||
@@ -42,6 +42,9 @@ get:
|
||||
type: number
|
||||
viewcount:
|
||||
type: number
|
||||
thumb:
|
||||
type: string
|
||||
description: An uploaded topic thumbnail
|
||||
deleted:
|
||||
type: number
|
||||
locked:
|
||||
|
||||
@@ -53,6 +53,9 @@ 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
|
||||
|
||||
@@ -49,6 +49,9 @@ get:
|
||||
type: number
|
||||
viewcount:
|
||||
type: number
|
||||
thumb:
|
||||
type: string
|
||||
description: An uploaded topic thumbnail
|
||||
postercount:
|
||||
type: number
|
||||
teaserPid:
|
||||
|
||||
@@ -98,9 +98,7 @@ function modifyTopic(topic, fields) {
|
||||
|
||||
escapeTitle(topic);
|
||||
|
||||
if (topic.hasOwnProperty('thumb')) {
|
||||
topic.thumb = validator.escape(String(topic.thumb));
|
||||
}
|
||||
topic.thumb = validator.escape(String(topic.thumb)) || '';
|
||||
|
||||
if (topic.hasOwnProperty('timestamp')) {
|
||||
topic.timestampISO = utils.toISOString(topic.timestamp);
|
||||
|
||||
Reference in New Issue
Block a user