@malevich-studio/strapi-sdk-typescript 1.0.6 → 1.0.7

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.d.ts CHANGED
@@ -124,8 +124,8 @@ declare class Strapi {
124
124
  upload(files: {
125
125
  path: string;
126
126
  filename?: string;
127
- }[]): Promise<File[]>;
128
- uploadForm(form: FormData): Promise<File[]>;
127
+ }[]): Promise<File>;
128
+ uploadForm(form: FormData): Promise<File>;
129
129
  private baseRequest;
130
130
  }
131
131
 
package/dist/index.mjs CHANGED
@@ -21277,10 +21277,10 @@ class Strapi {
21277
21277
  return await this.uploadForm(form);
21278
21278
  }
21279
21279
  async uploadForm(form) {
21280
- return await this.baseRequest('upload', {
21280
+ return (await this.baseRequest('upload', {
21281
21281
  method: 'POST',
21282
21282
  body: form,
21283
- });
21283
+ })).data;
21284
21284
  }
21285
21285
  async baseRequest(endpoint, params = {}) {
21286
21286
  const response = await fetch(`${this.url}/api/${endpoint}`, _.merge({