@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/index.cjs CHANGED
@@ -21419,15 +21419,16 @@ class Strapi {
21419
21419
  }));
21420
21420
  }
21421
21421
  async baseFetch(endpoint, params = {}) {
21422
- const response = await fetch(`${this.url}/api/${endpoint}`, _.merge({
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(`${this.url}/api/${endpoint}`);
21431
+ log(mergedParams);
21431
21432
  log(response);
21432
21433
  log(data);
21433
21434
  return data;