mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
10 lines
393 B
JavaScript
10 lines
393 B
JavaScript
module.exports = function(user, req, cb) {
|
|
var cardType;
|
|
cardType = req.params.cardType;
|
|
user.items.special[cardType + "Received"].shift();
|
|
if (typeof user.markModified === "function") {
|
|
user.markModified("items.special." + cardType + "Received");
|
|
}
|
|
user.flags.cardReceived = false;
|
|
return typeof cb === "function" ? cb(null, 'items.special flags.cardReceived') : void 0;
|
|
};
|