mirror of
https://hk.gh-proxy.com/https://github.com/NodeBB/nodebb-plugin-composer-default.git
synced 2025-10-04 04:41:20 +08:00
tags are stored in topic hash, no need to load twice
This commit is contained in:
parent
54cbf9ec55
commit
60215ca802
1 changed files with 2 additions and 3 deletions
|
@ -19,9 +19,8 @@ Sockets.push = async function (socket, pid) {
|
|||
throw new Error('[[error:invalid-pid]]');
|
||||
}
|
||||
|
||||
const [topic, tags, isMain] = await Promise.all([
|
||||
const [topic, isMain] = await Promise.all([
|
||||
topics.getTopicDataByPid(pid),
|
||||
topics.getTopicTags(postData.tid),
|
||||
posts.isMain(pid),
|
||||
]);
|
||||
|
||||
|
@ -36,7 +35,7 @@ Sockets.push = async function (socket, pid) {
|
|||
body: postData.sourceContent || postData.content,
|
||||
title: topic.title,
|
||||
thumb: topic.thumb,
|
||||
tags: tags,
|
||||
tags: topic.tags.map(t => t.value),
|
||||
isMain: isMain,
|
||||
timestamp: postData.timestamp,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue