feat: server-side routes for handling multiple topic thumbnails

closes #8994, requires 'topic-thumb-refactor' branch of composer-default
This commit is contained in:
Julian Lam
2020-12-01 10:37:42 -05:00
parent 98cd9e3549
commit 7e9e08f718
6 changed files with 96 additions and 0 deletions

View File

@@ -36,6 +36,9 @@ postsAPI.edit = async function (caller, data) {
data.req = apiHelpers.buildReqObject(caller);
const editResult = await posts.edit(data);
if (editResult.topic.isMainPost) {
await topics.thumbs.commit(data.uuid, editResult.topic.tid);
}
if (editResult.topic.renamed) {
await events.log({
type: 'topic-rename',