added csrftoken to getCart REST call
This commit is contained in:
parent
55bb48c750
commit
bd48a7dad8
File diff suppressed because one or more lines are too long
|
@ -60,7 +60,8 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
isloggedin: state => state.User.isloggedin,
|
isloggedin: state => state.User.isloggedin,
|
||||||
isAdherent: state => state.User.isAdherent
|
isAdherent: state => state.User.isAdherent,
|
||||||
|
csrftoken: state => state.User.csrftoken
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
@ -93,7 +94,8 @@ export default {
|
||||||
this.addtocart()
|
this.addtocart()
|
||||||
},
|
},
|
||||||
getCarts () {
|
getCarts () {
|
||||||
return REST.get(`/cart?_format=json`)
|
// this is bugging on stage
|
||||||
|
return REST.get(`/cart?_format=json`, {}, {'X-CSRF-Token':this.csrftoken})
|
||||||
// .then(({ data }) => {
|
// .then(({ data }) => {
|
||||||
// console.log('current user carts: data', data)
|
// console.log('current user carts: data', data)
|
||||||
// })
|
// })
|
||||||
|
|
Loading…
Reference in New Issue