@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/cli.mjs
CHANGED
|
@@ -21423,15 +21423,16 @@ class Strapi {
|
|
|
21423
21423
|
}));
|
|
21424
21424
|
}
|
|
21425
21425
|
async baseFetch(endpoint, params = {}) {
|
|
21426
|
-
const
|
|
21426
|
+
const mergedParams = _.merge({
|
|
21427
21427
|
...(this.token ? {
|
|
21428
21428
|
headers: {
|
|
21429
21429
|
Authorization: `Bearer ${this.token}`,
|
|
21430
21430
|
}
|
|
21431
21431
|
} : {}),
|
|
21432
|
-
}, params)
|
|
21432
|
+
}, params);
|
|
21433
|
+
const response = await fetch(`${this.url}/api/${endpoint}`, mergedParams);
|
|
21433
21434
|
const data = await response.json();
|
|
21434
|
-
log(
|
|
21435
|
+
log(mergedParams);
|
|
21435
21436
|
log(response);
|
|
21436
21437
|
log(data);
|
|
21437
21438
|
return data;
|