@velocitycareerlabs/common-fetchers 2.0.0-pre.1751237577 → 2.0.0-pre.1751410520

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/common-fetchers",
3
- "version": "2.0.0-pre.1751237577",
3
+ "version": "2.0.0-pre.1751410520",
4
4
  "description": "Set of fetchers used by Velocity Network servers",
5
5
  "repository": "https://github.com/velocitycareerlabs/velocitycore",
6
6
  "main": "src/index.js",
@@ -35,5 +35,5 @@
35
35
  "lib"
36
36
  ]
37
37
  },
38
- "gitHead": "273d49faf0d1b6fec39d6ff50eedecd11bef560d"
38
+ "gitHead": "2af7c6c97aca32c0489dcd053cc2ecd4c24213f0"
39
39
  }
@@ -14,12 +14,16 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- const resolveOrgVc = ({ did }, { registrarFetch }) =>
18
- registrarFetch
19
- .get(
20
- `api/v0.6/organizations/${did}/resolve-vc?type=OrganizationBasicProfile-v1.0`
21
- )
22
- .json();
17
+ const resolveOrgVc = async ({ did }, { registrarFetch }) => {
18
+ const path = `api/v0.6/organizations/${encodeURIComponent(
19
+ did
20
+ )}/resolve-vc?type=OrganizationBasicProfile-v1.0`;
21
+ if (registrarFetch.responseType === 'promise') {
22
+ const response = await registrarFetch.get(path);
23
+ return response.json();
24
+ }
25
+ return registrarFetch.get(path).json();
26
+ };
23
27
 
24
28
  module.exports = {
25
29
  resolveOrgVc,