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

@@ -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;