Burn: Added card burning for notes and gems

This commit is contained in:
2022-09-26 16:09:23 +02:00
parent bbbcaaaf29
commit 16bb46403b
9 changed files with 183 additions and 30 deletions

View File

@@ -89,7 +89,8 @@ module.exports = {
if (group) {
cards = await Card.findAndCountAll({
where: {
userId: user.id
userId: user.id,
burned: false
},
group: ["characterId"],
attributes: ["characterId", [Card.sequelize.fn("COUNT", "characterId"), "count"]],
@@ -104,7 +105,8 @@ module.exports = {
} else {
cards = await Card.findAndCountAll({
where: {
userId: user.id
userId: user.id,
burned: false
},
limit: pageSize,
offset: offset,