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