orderiom-api-package 0.4.42 → 0.4.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/common.js +8 -1
- package/src/modules/order.js +11 -18
package/package.json
CHANGED
package/src/common.js
CHANGED
|
@@ -128,7 +128,14 @@ axios.interceptors.request.use(config => {
|
|
|
128
128
|
return Promise.reject(error);
|
|
129
129
|
});
|
|
130
130
|
axios.interceptors.response.use(
|
|
131
|
-
res =>
|
|
131
|
+
res => {
|
|
132
|
+
return {
|
|
133
|
+
type: 'success',
|
|
134
|
+
msg: '',
|
|
135
|
+
status: res.status,
|
|
136
|
+
data: res.data
|
|
137
|
+
}
|
|
138
|
+
},
|
|
132
139
|
error => {
|
|
133
140
|
if (
|
|
134
141
|
error.response &&
|
package/src/modules/order.js
CHANGED
|
@@ -913,25 +913,18 @@ const actions = {
|
|
|
913
913
|
},
|
|
914
914
|
addReview({commit}, data) {
|
|
915
915
|
commit('setSubmittingReview', true);
|
|
916
|
-
return $http.post("api/testimonials/create", data)
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
).finally(() => {
|
|
923
|
-
commit('setSubmittingReview', false);
|
|
924
|
-
});
|
|
916
|
+
return $http.post("api/testimonials/create", data)
|
|
917
|
+
.then(res => res)
|
|
918
|
+
.catch(commonErrorCallback())
|
|
919
|
+
.finally(() => {
|
|
920
|
+
commit('setSubmittingReview', false);
|
|
921
|
+
});
|
|
925
922
|
},
|
|
926
|
-
|
|
927
|
-
const idToShow = id ? '/show?testimonialId' + id : ''
|
|
928
|
-
return $http.get(`api/testimonials${idToShow}`)
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
data: res.data
|
|
932
|
-
})).catch(
|
|
933
|
-
commonErrorCallback()
|
|
934
|
-
)
|
|
923
|
+
getReviews({commit}, id) {
|
|
924
|
+
const idToShow = id ? '/show?testimonialId=' + id : ''
|
|
925
|
+
return $http.get(`api/testimonials${idToShow}`)
|
|
926
|
+
.then(res => res)
|
|
927
|
+
.catch(commonErrorCallback())
|
|
935
928
|
},
|
|
936
929
|
addVoucher({ rootState, dispatch }, data) {
|
|
937
930
|
let basketId = undefined;
|