mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 16:41:21 +01:00
fix: properly incase its the same path
This commit is contained in:
@@ -81,7 +81,8 @@ Thumbs.associate = async function ({ id, path }) {
|
|||||||
const topics = require('.');
|
const topics = require('.');
|
||||||
await db.sortedSetAdd(set, numThumbs, path);
|
await db.sortedSetAdd(set, numThumbs, path);
|
||||||
if (!isDraft) {
|
if (!isDraft) {
|
||||||
await topics.setTopicField(id, 'numThumbs', numThumbs + 1);
|
const numThumbs = await db.sortedSetCard(set);
|
||||||
|
await topics.setTopicField(id, 'numThumbs', numThumbs);
|
||||||
}
|
}
|
||||||
cache.del(set);
|
cache.del(set);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user