@veritree/services 2.0.0 → 2.0.1
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/helpers/api.js +4 -1
package/package.json
CHANGED
package/src/helpers/api.js
CHANGED
|
@@ -26,7 +26,7 @@ function addVersionArg(url) {
|
|
|
26
26
|
*/
|
|
27
27
|
function getConfig(method, data, as) {
|
|
28
28
|
const isGet = method === "get";
|
|
29
|
-
const isSpoofing = as
|
|
29
|
+
const isSpoofing = as;
|
|
30
30
|
const isFormData = data instanceof FormData;
|
|
31
31
|
const accessToken = `Bearer ${getCookie("access_token")}`;
|
|
32
32
|
|
|
@@ -91,6 +91,7 @@ export default class Api {
|
|
|
91
91
|
* @returns {promise}
|
|
92
92
|
*/
|
|
93
93
|
async create(data, args) {
|
|
94
|
+
console.log(1);
|
|
94
95
|
return await this.post(null, data, null, args);
|
|
95
96
|
}
|
|
96
97
|
|
|
@@ -134,7 +135,9 @@ export default class Api {
|
|
|
134
135
|
* @returns {promise}
|
|
135
136
|
*/
|
|
136
137
|
async post(url, data, as, args) {
|
|
138
|
+
// console.log(args);
|
|
137
139
|
if (!url) url = `${this.getUrl()}${this.getUrlParams(args)}`;
|
|
140
|
+
console.log(url);
|
|
138
141
|
return await this.unWrap(url, "post", data, as);
|
|
139
142
|
}
|
|
140
143
|
|