pinata 1.0.4 → 1.0.6

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
@@ -128,7 +128,8 @@ var uploadFile = async (config, file, options) => {
128
128
  );
129
129
  }
130
130
  const res = await request.json();
131
- return res;
131
+ const resData = res.data;
132
+ return resData;
132
133
  } catch (error) {
133
134
  if (error instanceof PinataError) {
134
135
  throw error;
@@ -190,7 +191,8 @@ var uploadBase64 = async (config, base64String, options) => {
190
191
  );
191
192
  }
192
193
  const res = await request.json();
193
- return res;
194
+ const resData = res.data;
195
+ return resData;
194
196
  } catch (error) {
195
197
  if (error instanceof PinataError) {
196
198
  throw error;
@@ -264,7 +266,8 @@ var uploadUrl = async (config, url, options) => {
264
266
  );
265
267
  }
266
268
  const res = await request.json();
267
- return res;
269
+ const resData = res.data;
270
+ return resData;
268
271
  } catch (error) {
269
272
  if (error instanceof PinataError) {
270
273
  throw error;
@@ -326,7 +329,8 @@ var uploadJson = async (config, jsonData, options) => {
326
329
  );
327
330
  }
328
331
  const res = await request.json();
329
- return res;
332
+ const resData = res.data;
333
+ return resData;
330
334
  } catch (error) {
331
335
  if (error instanceof PinataError) {
332
336
  throw error;