mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
chore: eslint prefer-template
This commit is contained in:
committed by
Julian Lam
parent
4ee0f1459d
commit
707b55b6a5
@@ -49,7 +49,7 @@ module.exports = function (Posts) {
|
||||
|
||||
let result = await plugins.hooks.fire('filter:post.create', { post: postData, data: data });
|
||||
postData = result.post;
|
||||
await db.setObject('post:' + postData.pid, postData);
|
||||
await db.setObject(`post:${postData.pid}`, postData);
|
||||
|
||||
const topicData = await topics.getTopicFields(tid, ['cid', 'pinned']);
|
||||
postData.cid = topicData.cid;
|
||||
@@ -76,8 +76,8 @@ module.exports = function (Posts) {
|
||||
return;
|
||||
}
|
||||
await Promise.all([
|
||||
db.sortedSetAdd('pid:' + postData.toPid + ':replies', timestamp, postData.pid),
|
||||
db.incrObjectField('post:' + postData.toPid, 'replies'),
|
||||
db.sortedSetAdd(`pid:${postData.toPid}:replies`, timestamp, postData.pid),
|
||||
db.incrObjectField(`post:${postData.toPid}`, 'replies'),
|
||||
]);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user