mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +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,7 +1,7 @@
|
||||
import resetGear from '../fns/resetGear';
|
||||
import i18n from '../i18n';
|
||||
|
||||
module.exports = function reset (user, tasks = [], req = {}) {
|
||||
module.exports = function reset (user, tasks = []) {
|
||||
user.stats.hp = 50;
|
||||
user.stats.lvl = 1;
|
||||
user.stats.gp = 0;
|
||||
@@ -20,12 +20,8 @@ module.exports = function reset (user, tasks = [], req = {}) {
|
||||
|
||||
user.preferences.automaticAllocation = false;
|
||||
|
||||
if (req.v2 === true) {
|
||||
return user;
|
||||
} else {
|
||||
return [
|
||||
{user, tasksToRemove},
|
||||
i18n.t('resetComplete'),
|
||||
];
|
||||
}
|
||||
return [
|
||||
{user, tasksToRemove},
|
||||
i18n.t('resetComplete'),
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user