mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-17 15:30:12 +02:00
fix: #9827, fix reward duplication
This commit is contained in:
@@ -24,6 +24,7 @@ rewards.save = async function (data) {
|
||||
|
||||
await Promise.all(data.map(data => save(data)));
|
||||
await saveConditions(data);
|
||||
return data;
|
||||
};
|
||||
|
||||
rewards.delete = async function (data) {
|
||||
|
||||
@@ -5,7 +5,7 @@ const rewardsAdmin = require('../../rewards/admin');
|
||||
const SocketRewards = module.exports;
|
||||
|
||||
SocketRewards.save = async function (socket, data) {
|
||||
await rewardsAdmin.save(data);
|
||||
return await rewardsAdmin.save(data);
|
||||
};
|
||||
|
||||
SocketRewards.delete = async function (socket, data) {
|
||||
|
||||
Reference in New Issue
Block a user