Fix incorrect or missing parameters in functions of api
1."api.get()" need to add 'config' parameter for some circumstance
need to modify configure.
2.The second param of api.delete() is payload not config.
3."api.patch()" need to add 'config' parameter for some circumstance
need to modify configure.
4."api.put()" need to add 'config' parameter for some circumstance
need to modify configure.
Change-Id: I2df9eae468933c043dd9be1e12d2e2aeb9576ae8
Signed-off-by: Bowei Yu <yubowei0982@phytium.com.cn>
diff --git a/src/store/api.js b/src/store/api.js
index 51c5cdc..9fd900d 100644
--- a/src/store/api.js
+++ b/src/store/api.js
@@ -34,20 +34,20 @@
});
export default {
- get(path) {
- return api.get(path);
+ get(path, config) {
+ return api.get(path, config);
},
- delete(path, payload) {
- return api.delete(path, payload);
+ delete(path, config) {
+ return api.delete(path, config);
},
post(path, payload, config) {
return api.post(path, payload, config);
},
- patch(path, payload) {
- return api.patch(path, payload);
+ patch(path, payload, config) {
+ return api.patch(path, payload, config);
},
- put(path, payload) {
- return api.put(path, payload);
+ put(path, payload, config) {
+ return api.put(path, payload, config);
},
all(promises) {
return Axios.all(promises);