Client: use api v4 (#10457)

* client: use api v4

* fix tests
This commit is contained in:
Matteo Pagliazzi
2018-06-21 21:25:27 +02:00
committed by GitHub
parent c1bd7f5dc5
commit 592cfef6c6
46 changed files with 176 additions and 172 deletions

View File

@@ -308,7 +308,7 @@ export default {
let date = moment(this.user.lastCron).subtract(numberOfDays, 'days').toDate();
await axios.post('/api/v3/debug/set-cron', {
await axios.post('/api/v4/debug/set-cron', {
lastCron: date,
});
@@ -316,12 +316,12 @@ export default {
// @TODO: Sync user?
},
async addTenGems () {
await axios.post('/api/v3/debug/add-ten-gems');
await axios.post('/api/v4/debug/add-ten-gems');
// @TODO: Notification.text('+10 Gems!');
this.user.balance += 2.5;
},
async addHourglass () {
await axios.post('/api/v3/debug/add-hourglass');
await axios.post('/api/v4/debug/add-hourglass');
// @TODO: Sync?
},
addGold () {
@@ -356,13 +356,13 @@ export default {
});
},
async addQuestProgress () {
await axios.post('/api/v3/debug/quest-progress');
await axios.post('/api/v4/debug/quest-progress');
// @TODO: Notification.text('Quest progress increased');
// @TODO: User.sync();
},
async makeAdmin () {
await axios.post('/api/v3/debug/make-admin');
await axios.post('/api/v4/debug/make-admin');
// @TODO: Notification.text('You are now an admin! Go to the Hall of Heroes to change your contributor level.');
// @TODO: sync()