fix: change params

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 9b151b2316
commit de4619689b

@ -7,7 +7,8 @@ const plugins = require('../plugins');
const rewards = module.exports;
rewards.checkConditionAndRewardUser = async function (uid, condition, method) {
rewards.checkConditionAndRewardUser = async function (params) {
const { uid, condition, method } = params;
const isActive = await isConditionActive(condition);
if (!isActive) {
return;

@ -66,7 +66,11 @@ describe('rewards', function () {
function method(next) {
next(null, 1);
}
rewards.checkConditionAndRewardUser(adminUid, 'essentials/user.postcount', method, function (err, data) {
rewards.checkConditionAndRewardUser({
uid: adminUid,
condition: 'essentials/user.postcount',
method: method,
}, function (err, data) {
assert.ifError(err);
done();
});

Loading…
Cancel
Save