@malevich-studio/strapi-sdk-typescript 1.2.11 → 1.2.12

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.mjs CHANGED
@@ -21300,11 +21300,11 @@ class Strapi {
21300
21300
  this.token = token;
21301
21301
  }
21302
21302
  async fetch(endpoint, data = {}, params = {}) {
21303
- const queryString = params.method === 'GET' ? qs.stringify(data) : '';
21304
- return await this.fetchData(queryString ? `${endpoint}?${queryString}` : endpoint, { data }, params);
21303
+ return await this.fetchData(endpoint, { data }, params);
21305
21304
  }
21306
21305
  async fetchData(endpoint, data = {}, params = {}) {
21307
- return await this.baseFetch(endpoint, _.merge({
21306
+ const queryString = params.method === 'GET' ? qs.stringify(data) : '';
21307
+ return await this.baseFetch(queryString ? `${endpoint}?${queryString}` : endpoint, _.merge({
21308
21308
  headers: {
21309
21309
  'Content-Type': 'application/json',
21310
21310
  },