pinata 1.0.2 → 1.0.4

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
@@ -1093,8 +1093,12 @@ var createSignedURL = async (config, options) => {
1093
1093
  expires: options.expires,
1094
1094
  method: "GET"
1095
1095
  });
1096
+ let endpoint = "https://api.pinata.cloud/v3";
1097
+ if (config.endpointUrl) {
1098
+ endpoint = config.endpointUrl;
1099
+ }
1096
1100
  try {
1097
- const request = await fetch("https://api.pinata.cloud/v3/files/sign", {
1101
+ const request = await fetch(`${endpoint}/files/sign`, {
1098
1102
  method: "POST",
1099
1103
  headers: {
1100
1104
  "Content-Type": "application/json",