mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Ported reroll. Added unit tests. Added reroll route. Added integration tests
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
NotAuthorized,
|
||||
} from '../libs/errors';
|
||||
import splitWhitespace from '../libs/splitWhitespace';
|
||||
import _ from 'lodash';
|
||||
|
||||
module.exports = function releaseBoth (user, req = {}, analytics) {
|
||||
let animal;
|
||||
@@ -20,15 +21,15 @@ module.exports = function releaseBoth (user, req = {}, analytics) {
|
||||
uuid: user._id,
|
||||
acquireMethod: 'Gems',
|
||||
gemCost: 6,
|
||||
category: 'behavior'
|
||||
category: 'behavior',
|
||||
});
|
||||
}
|
||||
|
||||
user.balance -= 1.5;
|
||||
}
|
||||
|
||||
user.items.currentMount = "";
|
||||
user.items.currentPet = "";
|
||||
user.items.currentMount = '';
|
||||
user.items.currentPet = '';
|
||||
|
||||
for (animal in content.pets) {
|
||||
if (user.items.pets[animal] === -1) {
|
||||
|
||||
Reference in New Issue
Block a user