mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
remove some more parseInts
This commit is contained in:
@@ -97,7 +97,6 @@ module.exports = function (Categories) {
|
||||
function (oldParent, next) {
|
||||
async.series([
|
||||
function (next) {
|
||||
oldParent = parseInt(oldParent, 10) || 0;
|
||||
db.sortedSetRemove('cid:' + oldParent + ':children', cid, next);
|
||||
},
|
||||
function (next) {
|
||||
@@ -125,9 +124,7 @@ module.exports = function (Categories) {
|
||||
db.delete('cid:' + cid + ':tag:whitelist', next);
|
||||
},
|
||||
function (next) {
|
||||
var scores = tags.map(function (tag, index) {
|
||||
return index;
|
||||
});
|
||||
var scores = tags.map((tag, index) => index);
|
||||
db.sortedSetAdd('cid:' + cid + ':tag:whitelist', scores, tags, next);
|
||||
},
|
||||
], callback);
|
||||
@@ -144,7 +141,6 @@ module.exports = function (Categories) {
|
||||
db.sortedSetAdd('categories:cid', order, cid, next);
|
||||
},
|
||||
function (next) {
|
||||
parentCid = parseInt(parentCid, 10) || 0;
|
||||
db.sortedSetAdd('cid:' + parentCid + ':children', order, cid, next);
|
||||
},
|
||||
], next);
|
||||
|
||||
Reference in New Issue
Block a user