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