mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
wip: split shared ops
This commit is contained in:
7
common/script/ops/deletePM.js
Normal file
7
common/script/ops/deletePM.js
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = function (user, req, cb) {
|
||||
delete user.inbox.messages[req.params.id];
|
||||
if (typeof user.markModified === 'function') {
|
||||
user.markModified('inbox.messages.' + req.params.id);
|
||||
}
|
||||
return typeof cb === 'function' ? cb(null, user.inbox.messages) : void 0;
|
||||
};
|
||||
Reference in New Issue
Block a user