mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Remove unused v2 code from /website/common/script (#8034)
* remove apiv2 behavior from ops * remove apiv2 behavior from fns
This commit is contained in:
committed by
Blade Barringer
parent
8f9ed6e377
commit
5f0c1687b5
@@ -1,14 +1,10 @@
|
||||
import i18n from '../i18n';
|
||||
|
||||
module.exports = function markPmsRead (user, req = {}) {
|
||||
module.exports = function markPmsRead (user) {
|
||||
user.inbox.newMessages = 0;
|
||||
|
||||
if (req.v2 === true) {
|
||||
return user;
|
||||
} else {
|
||||
return [
|
||||
user.inbox.newMessages,
|
||||
i18n.t('pmsMarkedRead'),
|
||||
];
|
||||
}
|
||||
return [
|
||||
user.inbox.newMessages,
|
||||
i18n.t('pmsMarkedRead'),
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user