Skip to content
Permalink
Browse files

fix for latest nbb async changes

  • Loading branch information...
barisusakli committed Jun 6, 2019
1 parent 860b9fe commit b2a6caaba0447fd0344f9cda4995983f1019e2a2
Showing with 9 additions and 9 deletions.
  1. +6 −6 lib/conditionals.js
  2. +1 −1 lib/conditions.js
  3. +1 −1 lib/rewards.js
  4. +1 −1 library.js
@@ -26,28 +26,28 @@ conditionals.get = function (conditionals, callback) {
},
]);

callback(false, conditionals);
callback(null, conditionals);
};


conditionals.greaterthan = function (data, callback) {
callback(false, parseInt(data.left, 10) > parseInt(data.right, 10));
callback(null, parseInt(data.left, 10) > parseInt(data.right, 10));
};

conditionals.greaterorequalthan = function (data, callback) {
callback(false, parseInt(data.left, 10) >= parseInt(data.right, 10));
callback(null, parseInt(data.left, 10) >= parseInt(data.right, 10));
};

conditionals.lesserthan = function (data, callback) {
callback(false, parseInt(data.left, 10) < parseInt(data.right, 10));
callback(null, parseInt(data.left, 10) < parseInt(data.right, 10));
};

conditionals.lesserorequalthan = function (data, callback) {
callback(false, parseInt(data.left, 10) <= parseInt(data.right, 10));
callback(null, parseInt(data.left, 10) <= parseInt(data.right, 10));
};

conditionals.string = function (data, callback) {
callback(false, data.left === data.right);
callback(null, data.left === data.right);
};


@@ -18,7 +18,7 @@ conditions.get = function (conditions, callback) {
},
]);

callback(false, conditions);
callback(null, conditions);
};

module.exports = conditions;
@@ -67,7 +67,7 @@ rewards.get = function (rewards, callback) {
},
]);

callback(false, rewards);
callback(null, rewards);
});
};

@@ -22,7 +22,7 @@ plugin.onOnline = function (data) {
var lastOnline = data.timestamp;

rewards.checkConditionAndRewardUser(uid, 'essentials/user.lastonline', function (callback) {
callback(false, lastOnline);
callback(null, lastOnline);
});
};

0 comments on commit b2a6caa

Please sign in to comment.
You can’t perform that action at this time.