@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 CHANGED
@@ -21443,15 +21443,16 @@ class Strapi {
21443
21443
  }));
21444
21444
  }
21445
21445
  async baseFetch(endpoint, params = {}) {
21446
- const response = await fetch(`${this.url}/api/${endpoint}`, _.merge({
21446
+ const mergedParams = _.merge({
21447
21447
  ...(this.token ? {
21448
21448
  headers: {
21449
21449
  Authorization: `Bearer ${this.token}`,
21450
21450
  }
21451
21451
  } : {}),
21452
- }, params));
21452
+ }, params);
21453
+ const response = await fetch(`${this.url}/api/${endpoint}`, mergedParams);
21453
21454
  const data = await response.json();
21454
- log(`${this.url}/api/${endpoint}`);
21455
+ log(mergedParams);
21455
21456
  log(response);
21456
21457
  log(data);
21457
21458
  return data;