diff --git a/test/client/unit/specs/libs/asyncResource.js b/test/client/unit/specs/libs/asyncResource.js
index 3123dd505b..059c8cc409 100644
--- a/test/client/unit/specs/libs/asyncResource.js
+++ b/test/client/unit/specs/libs/asyncResource.js
@@ -80,12 +80,12 @@ describe('async resource', () => {
const store = generateStore();
store.state.user = asyncResourceFactory();
- sandbox.stub(axios, 'get').withArgs('/api/v3/user').returns(Promise.resolve({data: {data: {_id: 1}}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/user').returns(Promise.resolve({data: {data: {_id: 1}}}));
const resource = await loadAsyncResource({
store,
path: 'user',
- url: '/api/v3/user',
+ url: '/api/v4/user',
deserialize (response) {
return response.data.data;
},
@@ -101,12 +101,12 @@ describe('async resource', () => {
const store = generateStore();
store.state.user.loadingStatus = 'LOADED';
- sandbox.stub(axios, 'get').withArgs('/api/v3/user').returns(Promise.resolve({data: {data: {_id: 1}}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/user').returns(Promise.resolve({data: {data: {_id: 1}}}));
const resource = await loadAsyncResource({
store,
path: 'user',
- url: '/api/v3/user',
+ url: '/api/v4/user',
deserialize (response) {
return response.data.data;
},
@@ -123,12 +123,12 @@ describe('async resource', () => {
const store = generateStore();
store.state.user.loadingStatus = 'LOADING';
- sandbox.stub(axios, 'get').withArgs('/api/v3/user').returns(Promise.resolve({data: {data: {_id: 1}}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/user').returns(Promise.resolve({data: {data: {_id: 1}}}));
const resourcePromise = loadAsyncResource({
store,
path: 'user',
- url: '/api/v3/user',
+ url: '/api/v4/user',
deserialize (response) {
return response.data.data;
},
diff --git a/test/client/unit/specs/store/actions/shops.js b/test/client/unit/specs/store/actions/shops.js
index 516bdaacdc..1a72ae44d4 100644
--- a/test/client/unit/specs/store/actions/shops.js
+++ b/test/client/unit/specs/store/actions/shops.js
@@ -39,7 +39,7 @@ describe('shops actions', () => {
let item = getItemInfo(user, 'marketGear', gearItem, getOfficialPinnedItems(user));
- sandbox.stub(axios, 'post').withArgs('/api/v3/user/buy/armor_rogue_1').returns(Promise.resolve({data: {data: {}}}));
+ sandbox.stub(axios, 'post').withArgs('/api/v4/user/buy/armor_rogue_1').returns(Promise.resolve({data: {data: {}}}));
await store.dispatch('shops:genericPurchase', {
pinType: item.pinType,
diff --git a/test/client/unit/specs/store/actions/tasks.js b/test/client/unit/specs/store/actions/tasks.js
index bdf9a2dc3f..8189500fc8 100644
--- a/test/client/unit/specs/store/actions/tasks.js
+++ b/test/client/unit/specs/store/actions/tasks.js
@@ -12,7 +12,7 @@ describe('tasks actions', () => {
xit('fetches user tasks', async () => {
expect(store.state.tasks.loadingStatus).to.equal('NOT_LOADED');
const tasks = [{_id: 1}];
- sandbox.stub(axios, 'get').withArgs('/api/v3/tasks/user').returns(Promise.resolve({data: {data: tasks}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/tasks/user').returns(Promise.resolve({data: {data: tasks}}));
await store.dispatch('tasks:fetchUserTasks');
@@ -28,7 +28,7 @@ describe('tasks actions', () => {
};
const tasks = [{_id: 2}];
- sandbox.stub(axios, 'get').withArgs('/api/v3/tasks/user').returns(Promise.resolve({data: {data: tasks}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/tasks/user').returns(Promise.resolve({data: {data: tasks}}));
await store.dispatch('tasks:fetchUserTasks');
@@ -43,7 +43,7 @@ describe('tasks actions', () => {
};
const tasks = [{_id: 2}];
- sandbox.stub(axios, 'get').withArgs('/api/v3/tasks/user').returns(Promise.resolve({data: {data: tasks}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/tasks/user').returns(Promise.resolve({data: {data: tasks}}));
await store.dispatch('tasks:fetchUserTasks', true);
diff --git a/test/client/unit/specs/store/actions/user.js b/test/client/unit/specs/store/actions/user.js
index 2e9e7e579d..f66d803d3f 100644
--- a/test/client/unit/specs/store/actions/user.js
+++ b/test/client/unit/specs/store/actions/user.js
@@ -12,7 +12,7 @@ describe('user actions', () => {
it('loads the user', async () => {
expect(store.state.user.loadingStatus).to.equal('NOT_LOADED');
const user = {_id: 1};
- sandbox.stub(axios, 'get').withArgs('/api/v3/user').returns(Promise.resolve({data: {data: user}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/user').returns(Promise.resolve({data: {data: user}}));
await store.dispatch('user:fetch');
@@ -28,7 +28,7 @@ describe('user actions', () => {
};
const user = {_id: 2};
- sandbox.stub(axios, 'get').withArgs('/api/v3/user').returns(Promise.resolve({data: {data: user}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/user').returns(Promise.resolve({data: {data: user}}));
await store.dispatch('user:fetch');
@@ -43,7 +43,7 @@ describe('user actions', () => {
};
const user = {_id: 2};
- sandbox.stub(axios, 'get').withArgs('/api/v3/user').returns(Promise.resolve({data: {data: user}}));
+ sandbox.stub(axios, 'get').withArgs('/api/v4/user').returns(Promise.resolve({data: {data: user}}));
await store.dispatch('user:fetch', {forceLoad: true});
diff --git a/webpack/config/index.js b/webpack/config/index.js
index ff54852be9..463e6f3028 100644
--- a/webpack/config/index.js
+++ b/webpack/config/index.js
@@ -41,11 +41,15 @@ module.exports = {
assetsPublicPath: '/',
staticAssetsDirectory,
proxyTable: {
- // proxy all requests starting with /api/v3 to IP:PORT as specified in the top-level config
+ // proxy all requests to the server at IP:PORT as specified in the top-level config
'/api/v3': {
target: DEV_BASE_URL,
changeOrigin: true,
},
+ '/api/v4': {
+ target: DEV_BASE_URL,
+ changeOrigin: true,
+ },
'/stripe': {
target: DEV_BASE_URL,
changeOrigin: true,
diff --git a/website/client/app.vue b/website/client/app.vue
index fab6975417..2c747c5f5f 100644
--- a/website/client/app.vue
+++ b/website/client/app.vue
@@ -306,7 +306,7 @@ export default {
// Don't show errors from getting user details. These users have delete their account,
// but their chat message still exists.
let configExists = Boolean(error.response) && Boolean(error.response.config);
- if (configExists && error.response.config.method === 'get' && error.response.config.url.indexOf('/api/v3/members/') !== -1) {
+ if (configExists && error.response.config.method === 'get' && error.response.config.url.indexOf('/api/v4/members/') !== -1) {
// @TODO: We resolve the promise because we need our caching to cache this user as tried
// Chat paging should help this, but maybe we can also find another solution..
return Promise.resolve(error);
@@ -348,20 +348,20 @@ export default {
const url = response.config.url;
const method = response.config.method;
- const isApiCall = url.indexOf('api/v3') !== -1;
+ const isApiCall = url.indexOf('api/v4') !== -1;
const userV = response.data && response.data.userV;
- const isCron = url.indexOf('/api/v3/cron') === 0 && method === 'post';
+ const isCron = url.indexOf('/api/v4/cron') === 0 && method === 'post';
if (this.isUserLoaded && isApiCall && userV) {
const oldUserV = this.user._v;
this.user._v = userV;
// Do not sync again if already syncing
- const isUserSync = url.indexOf('/api/v3/user') === 0 && method === 'get';
- const isTasksSync = url.indexOf('/api/v3/tasks/user') === 0 && method === 'get';
+ const isUserSync = url.indexOf('/api/v4/user') === 0 && method === 'get';
+ const isTasksSync = url.indexOf('/api/v4/tasks/user') === 0 && method === 'get';
// exclude chat seen requests because with real time chat they would be too many
const isChatSeen = url.indexOf('/chat/seen') !== -1 && method === 'post';
- // exclude POST /api/v3/cron because the user is synced automatically after cron runs
+ // exclude POST /api/v4/cron because the user is synced automatically after cron runs
// Something has changed on the user object that was not tracked here, sync the user
if (userV - oldUserV > 1 && !isCron && !isChatSeen && !isUserSync && !isTasksSync) {
diff --git a/website/client/components/achievements/death.vue b/website/client/components/achievements/death.vue
index 0788e8e836..5d3595e723 100644
--- a/website/client/components/achievements/death.vue
+++ b/website/client/components/achievements/death.vue
@@ -66,7 +66,7 @@ export default {
this.$root.$emit('bv::hide::modal', 'death');
},
async revive () {
- await axios.post('/api/v3/user/revive');
+ await axios.post('/api/v4/user/revive');
revive(this.user);
this.close();
},
diff --git a/website/client/components/achievements/newStuff.vue b/website/client/components/achievements/newStuff.vue
index db2976136f..7129f2a329 100644
--- a/website/client/components/achievements/newStuff.vue
+++ b/website/client/components/achievements/newStuff.vue
@@ -40,7 +40,7 @@
async mounted () {
this.$root.$on('bv::show::modal', async (modalId) => {
if (modalId !== 'new-stuff') return;
- let response = await axios.get('/api/v3/news');
+ let response = await axios.get('/api/v4/news');
this.html = response.data.html;
});
},
diff --git a/website/client/components/appFooter.vue b/website/client/components/appFooter.vue
index 8d9db98aff..e101c54578 100644
--- a/website/client/components/appFooter.vue
+++ b/website/client/components/appFooter.vue
@@ -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()
diff --git a/website/client/components/auth/registerLoginReset.vue b/website/client/components/auth/registerLoginReset.vue
index 1016bf07ce..c0385221ea 100644
--- a/website/client/components/auth/registerLoginReset.vue
+++ b/website/client/components/auth/registerLoginReset.vue
@@ -370,7 +370,7 @@ export default {
}
// @TODO: implement langauge and invite accepting
- // var url = ApiUrl.get() + "/api/v3/user/auth/local/register";
+ // var url = ApiUrl.get() + "/api/v4/user/auth/local/register";
// if (location.search && location.search.indexOf('Invite=') !== -1) { // matches groupInvite and partyInvite
// url += location.search;
// }
@@ -481,7 +481,7 @@ export default {
return;
}
- await axios.post('/api/v3/user/reset-password', {
+ await axios.post('/api/v4/user/reset-password', {
email: this.username,
});
@@ -499,7 +499,7 @@ export default {
return;
}
- const res = await axios.post('/api/v3/user/auth/reset-password-set-new-one', {
+ const res = await axios.post('/api/v4/user/auth/reset-password-set-new-one', {
newPassword: this.password,
confirmPassword: this.passwordConfirm,
code: this.resetPasswordSetNewOneData.code,
diff --git a/website/client/components/challenges/challengeDetail.vue b/website/client/components/challenges/challengeDetail.vue
index b3744a7c2f..bf58dc934f 100644
--- a/website/client/components/challenges/challengeDetail.vue
+++ b/website/client/components/challenges/challengeDetail.vue
@@ -381,7 +381,7 @@ export default {
// let response = await this.$store.dispatch('challenges:exportChallengeCsv', {
// challengeId: this.searchId,
// });
- window.location = `/api/v3/challenges/${this.searchId}/export/csv`;
+ window.location = `/api/v4/challenges/${this.searchId}/export/csv`;
},
cloneChallenge () {
this.$root.$emit('habitica:clone-challenge', {
diff --git a/website/client/components/challenges/challengeMemberProgressModal.vue b/website/client/components/challenges/challengeMemberProgressModal.vue
index 852b634335..dca795c473 100644
--- a/website/client/components/challenges/challengeMemberProgressModal.vue
+++ b/website/client/components/challenges/challengeMemberProgressModal.vue
@@ -38,7 +38,7 @@ export default {
reward: [],
};
- let response = await axios.get(`/api/v3/challenges/${this.challengeId}/members/${this.memberId}`);
+ let response = await axios.get(`/api/v4/challenges/${this.challengeId}/members/${this.memberId}`);
let tasks = response.data.data.tasks;
tasks.forEach((task) => {
this.tasksByType[task.type].push(task);
diff --git a/website/client/components/chat/chatCard.vue b/website/client/components/chat/chatCard.vue
index be680634ce..a8fb593609 100644
--- a/website/client/components/chat/chatCard.vue
+++ b/website/client/components/chat/chatCard.vue
@@ -253,7 +253,7 @@ export default {
this.$emit('message-removed', message);
if (this.inbox) {
- axios.delete(`/api/v3/user/messages/${message.id}`);
+ axios.delete(`/api/v4/user/messages/${message.id}`);
this.$delete(this.user.inbox.messages, message.id);
return;
}
diff --git a/website/client/components/chat/chatMessages.vue b/website/client/components/chat/chatMessages.vue
index d5b97b37f8..6868cdb1c6 100644
--- a/website/client/components/chat/chatMessages.vue
+++ b/website/client/components/chat/chatMessages.vue
@@ -164,7 +164,7 @@ export default {
if (Boolean(uuid) && !this.cachedProfileData[uuid] && !aboutToCache[uuid]) {
if (uuid === 'system' || this.currentProfileLoadedCount === this.currentProfileLoadedEnd) return;
aboutToCache[uuid] = {};
- promises.push(axios.get(`/api/v3/members/${uuid}`));
+ promises.push(axios.get(`/api/v4/members/${uuid}`));
this.currentProfileLoadedCount += 1;
}
});
diff --git a/website/client/components/creatorIntro.vue b/website/client/components/creatorIntro.vue
index c28bb5a3e9..3b7a927711 100644
--- a/website/client/components/creatorIntro.vue
+++ b/website/client/components/creatorIntro.vue
@@ -1441,7 +1441,7 @@ export default {
});
// @TODO: Move to the action
- let response = await axios.post('/api/v3/tasks/user', tasksToCreate);
+ let response = await axios.post('/api/v4/tasks/user', tasksToCreate);
let tasks = response.data.data;
tasks.forEach(task => {
this.$store.state.user.data.tasksOrder[`${task.type}s`].unshift(task._id);
@@ -1512,7 +1512,7 @@ export default {
}
}
- await axios.post(`/api/v3/user/unlock?path=${path}`);
+ await axios.post(`/api/v4/user/unlock?path=${path}`);
try {
unlock(this.user, {
query: {
diff --git a/website/client/components/header/userDropdown.vue b/website/client/components/header/userDropdown.vue
index 6d60e71e05..788197c37f 100644
--- a/website/client/components/header/userDropdown.vue
+++ b/website/client/components/header/userDropdown.vue
@@ -98,7 +98,7 @@ export default {
},
showInbox () {
markPMSRead(this.user);
- axios.post('/api/v3/user/mark-pms-read');
+ axios.post('/api/v4/user/mark-pms-read');
this.$root.$emit('bv::show::modal', 'inbox-modal');
},
showProfile (startingPage) {
diff --git a/website/client/components/inventory/items/cards-modal.vue b/website/client/components/inventory/items/cards-modal.vue
index f51b93de0e..62ccd17d69 100644
--- a/website/client/components/inventory/items/cards-modal.vue
+++ b/website/client/components/inventory/items/cards-modal.vue
@@ -54,7 +54,7 @@ export default {
},
methods: {
async readCard () {
- await axios.post(`/api/v3/user/read-card/${this.cardType}`);
+ await axios.post(`/api/v4/user/read-card/${this.cardType}`);
this.user.items.special[`${this.cardType}Received`].shift();
this.user.flags.cardReceived = false;
this.close();
diff --git a/website/client/components/modifyInventory.vue b/website/client/components/modifyInventory.vue
index 5651784091..68aa4de7b3 100644
--- a/website/client/components/modifyInventory.vue
+++ b/website/client/components/modifyInventory.vue
@@ -294,7 +294,7 @@ export default {
}
},
async modifyInventory () {
- await axios.post('/api/v3/debug/modify-inventory', {
+ await axios.post('/api/v4/debug/modify-inventory', {
gear: this.showInv.gear ? this.inv.gear : null,
special: this.showInv.special ? this.inv.special : null,
pets: this.showInv.pets ? this.inv.pets : null,
diff --git a/website/client/components/notifications.vue b/website/client/components/notifications.vue
index 58ceff56aa..04540cae95 100644
--- a/website/client/components/notifications.vue
+++ b/website/client/components/notifications.vue
@@ -399,7 +399,7 @@ export default {
},
async runYesterDailiesAction () {
// Run Cron
- await axios.post('/api/v3/cron');
+ await axios.post('/api/v4/cron');
// Notifications
@@ -532,7 +532,7 @@ export default {
let userReadNotifsPromise = false;
if (notificationsToRead.length > 0) {
- await axios.post('/api/v3/notifications/read', {
+ await axios.post('/api/v4/notifications/read', {
notificationIds: notificationsToRead,
});
}
diff --git a/website/client/components/payments/amazonModal.vue b/website/client/components/payments/amazonModal.vue
index e6f6707239..4d31910236 100644
--- a/website/client/components/payments/amazonModal.vue
+++ b/website/client/components/payments/amazonModal.vue
@@ -206,7 +206,7 @@ export default {
let url = '/amazon/subscribe';
if (this.amazonPayments.groupToCreate) {
- url = '/api/v3/groups/create-plan';
+ url = '/api/v4/groups/create-plan';
}
try {
diff --git a/website/client/components/settings/deleteModal.vue b/website/client/components/settings/deleteModal.vue
index 24a9d6fac5..e52e4989f1 100644
--- a/website/client/components/settings/deleteModal.vue
+++ b/website/client/components/settings/deleteModal.vue
@@ -47,7 +47,7 @@ export default {
this.$root.$emit('bv::hide::modal', 'reset');
},
async deleteAccount () {
- await axios.delete('/api/v3/user', {
+ await axios.delete('/api/v4/user', {
data: {
password: this.password,
feedback: this.feedback,
diff --git a/website/client/components/settings/promoCode.vue b/website/client/components/settings/promoCode.vue
index 07ebe74dee..2e4439ae01 100644
--- a/website/client/components/settings/promoCode.vue
+++ b/website/client/components/settings/promoCode.vue
@@ -40,7 +40,7 @@ export default {
...mapState({user: 'user.data', credentials: 'credentials'}),
getCodesUrl () {
if (!this.user) return '';
- return `/api/v3/coupons?_id=${this.user._id}&apiToken=${this.credentials.API_TOKEN}`;
+ return `/api/v4/coupons?_id=${this.user._id}&apiToken=${this.credentials.API_TOKEN}`;
},
},
methods: {
@@ -53,7 +53,7 @@ export default {
// })
},
async enterCoupon () {
- let code = await axios.post(`/api/v3/coupons/enter/${this.couponCode}`);
+ let code = await axios.post(`/api/v4/coupons/enter/${this.couponCode}`);
if (!code) return;
this.$store.state.user.data = code.data.data;
diff --git a/website/client/components/settings/resetModal.vue b/website/client/components/settings/resetModal.vue
index 54845e2d60..0c514e6b6f 100644
--- a/website/client/components/settings/resetModal.vue
+++ b/website/client/components/settings/resetModal.vue
@@ -20,7 +20,7 @@ export default {
this.$root.$emit('bv::hide::modal', 'reset');
},
async reset () {
- let response = await axios.post('/api/v3/user/reset');
+ let response = await axios.post('/api/v4/user/reset');
// @TODO: Not sure if this is correct
this.$store.user = response.data.data.user;
this.$router.push('/');
diff --git a/website/client/components/settings/site.vue b/website/client/components/settings/site.vue
index dfd25f4f6d..66b7efe19b 100644
--- a/website/client/components/settings/site.vue
+++ b/website/client/components/settings/site.vue
@@ -335,7 +335,7 @@ export default {
},
async saveDayStart () {
this.user.preferences.dayStart = this.newDayStart;
- await axios.post('/api/v3/user/custom-day-start', {
+ await axios.post('/api/v4/user/custom-day-start', {
dayStart: this.newDayStart,
});
// @TODO
@@ -348,7 +348,7 @@ export default {
setTimeout(() => window.location.reload(true));
},
async changeUser (attribute, updates) {
- await axios.put(`/api/v3/user/auth/update-${attribute}`, updates);
+ await axios.put(`/api/v4/user/auth/update-${attribute}`, updates);
alert(this.$t(`${attribute}Success`));
this.user[attribute] = updates[attribute];
},
@@ -362,7 +362,7 @@ export default {
this.$root.$emit('bv::show::modal', 'delete');
},
async deleteSocialAuth (network) {
- await axios.delete(`/api/v3/user/auth/social/${network.key}`);
+ await axios.delete(`/api/v4/user/auth/social/${network.key}`);
this.text(this.$t('detachedSocial', {network: network.name}));
},
async socialAuth (network) {
@@ -378,13 +378,13 @@ export default {
if (confirmationNeeded && !confirm(this.$t('changeClassConfirmCost'))) return;
try {
changeClass(this.user);
- await axios.post('/api/v3/user/change-class');
+ await axios.post('/api/v4/user/change-class');
} catch (e) {
alert(e.message);
}
},
addLocalAuth () {
- axios.post('/api/v3/user/auth/local/register', this.localAuth, 'addedLocalAuth');
+ axios.post('/api/v4/user/auth/local/register', this.localAuth, 'addedLocalAuth');
},
},
};
diff --git a/website/client/components/settings/subscription.vue b/website/client/components/settings/subscription.vue
index e086f99f59..c71ef673d8 100644
--- a/website/client/components/settings/subscription.vue
+++ b/website/client/components/settings/subscription.vue
@@ -248,7 +248,7 @@ export default {
});
},
async applyCoupon (coupon) {
- const response = await axios.post(`/api/v3/coupons/validate/${coupon}`);
+ const response = await axios.post(`/api/v4/coupons/validate/${coupon}`);
if (!response.data.data.valid) return;
diff --git a/website/client/components/static/newStuff.vue b/website/client/components/static/newStuff.vue
index fd1ac90c2a..2daef6d745 100644
--- a/website/client/components/static/newStuff.vue
+++ b/website/client/components/static/newStuff.vue
@@ -16,7 +16,7 @@ export default {
};
},
async mounted () {
- let response = await axios.get('/api/v3/news');
+ let response = await axios.get('/api/v4/news');
this.html = response.data.html;
},
};
diff --git a/website/client/components/tasks/task.vue b/website/client/components/tasks/task.vue
index a0b20754b3..cc63b911cb 100644
--- a/website/client/components/tasks/task.vue
+++ b/website/client/components/tasks/task.vue
@@ -718,7 +718,7 @@ export default {
if (task.group.approval.required) task.group.approval.requested = true;
Analytics.updateUser();
- const response = await axios.post(`/api/v3/tasks/${task._id}/score/${direction}`);
+ const response = await axios.post(`/api/v4/tasks/${task._id}/score/${direction}`);
const tmp = response.data.data._tmp || {}; // used to notify drops, critical hits and other bonuses
const crit = tmp.crit;
const drop = tmp.drop;
diff --git a/website/client/components/userMenu/profile.vue b/website/client/components/userMenu/profile.vue
index 0d6aa3b1cd..aa35641b53 100644
--- a/website/client/components/userMenu/profile.vue
+++ b/website/client/components/userMenu/profile.vue
@@ -507,12 +507,12 @@ export default {
},
blockUser () {
this.userLoggedIn.inbox.blocks.push(this.user._id);
- axios.post(`/api/v3/user/block/${this.user._id}`);
+ axios.post(`/api/v4/user/block/${this.user._id}`);
},
unblockUser () {
let index = this.userLoggedIn.inbox.blocks.indexOf(this.user._id);
this.userLoggedIn.inbox.blocks.splice(index, 1);
- axios.post(`/api/v3/user/block/${this.user._id}`);
+ axios.post(`/api/v4/user/block/${this.user._id}`);
},
openSendGemsModal () {
this.userReceivingGems = this.user;
diff --git a/website/client/components/userMenu/profileStats.vue b/website/client/components/userMenu/profileStats.vue
index 3e73caacde..24f9959151 100644
--- a/website/client/components/userMenu/profileStats.vue
+++ b/website/client/components/userMenu/profileStats.vue
@@ -305,7 +305,7 @@
if (this.statUpdates[stat] > 0) statUpdates[stat] = this.statUpdates[stat];
});
- await axios.post('/api/v3/user/allocate-bulk', {
+ await axios.post('/api/v4/user/allocate-bulk', {
stats: statUpdates,
});
diff --git a/website/client/index.html b/website/client/index.html
index f4fc232155..3ce5bf4e46 100644
--- a/website/client/index.html
+++ b/website/client/index.html
@@ -24,6 +24,6 @@
-
+