mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
chore: eslint prefer-template
This commit is contained in:
committed by
Julian Lam
parent
4ee0f1459d
commit
707b55b6a5
@@ -19,7 +19,7 @@ module.exports = function (Categories) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const keys = cids.map(cid => 'category:' + cid);
|
||||
const keys = cids.map(cid => `category:${cid}`);
|
||||
const categories = await (fields.length ? db.getObjectsFields(keys, fields) : db.getObjects(keys));
|
||||
const result = await plugins.hooks.fire('filter:category.getFields', {
|
||||
cids: cids,
|
||||
@@ -56,11 +56,11 @@ module.exports = function (Categories) {
|
||||
};
|
||||
|
||||
Categories.setCategoryField = async function (cid, field, value) {
|
||||
await db.setObjectField('category:' + cid, field, value);
|
||||
await db.setObjectField(`category:${cid}`, field, value);
|
||||
};
|
||||
|
||||
Categories.incrementCategoryFieldBy = async function (cid, field, value) {
|
||||
await db.incrObjectFieldBy('category:' + cid, field, value);
|
||||
await db.incrObjectFieldBy(`category:${cid}`, field, value);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user