pinata 1.0.3 → 1.0.5

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.js CHANGED
@@ -1119,8 +1119,12 @@ var createSignedURL = async (config, options) => {
1119
1119
  expires: options.expires,
1120
1120
  method: "GET"
1121
1121
  });
1122
+ let endpoint = "https://api.pinata.cloud/v3";
1123
+ if (config.endpointUrl) {
1124
+ endpoint = config.endpointUrl;
1125
+ }
1122
1126
  try {
1123
- const request = await fetch("https://api.pinata.cloud/v3/files/sign", {
1127
+ const request = await fetch(`${endpoint}/files/sign`, {
1124
1128
  method: "POST",
1125
1129
  headers: {
1126
1130
  "Content-Type": "application/json",