@malevich-studio/strapi-sdk-typescript 1.2.8 → 1.2.9
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/dist/cli.cjs +4 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +4 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -21417,15 +21417,16 @@ class Strapi {
|
|
|
21417
21417
|
}));
|
|
21418
21418
|
}
|
|
21419
21419
|
async baseFetch(endpoint, params = {}) {
|
|
21420
|
-
const
|
|
21420
|
+
const mergedParams = _.merge({
|
|
21421
21421
|
...(this.token ? {
|
|
21422
21422
|
headers: {
|
|
21423
21423
|
Authorization: `Bearer ${this.token}`,
|
|
21424
21424
|
}
|
|
21425
21425
|
} : {}),
|
|
21426
|
-
}, params)
|
|
21426
|
+
}, params);
|
|
21427
|
+
const response = await fetch(`${this.url}/api/${endpoint}`, mergedParams);
|
|
21427
21428
|
const data = await response.json();
|
|
21428
|
-
log(
|
|
21429
|
+
log(mergedParams);
|
|
21429
21430
|
log(response);
|
|
21430
21431
|
log(data);
|
|
21431
21432
|
return data;
|