@eluvio/elv-client-js 4.2.1 → 4.2.2

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": "@eluvio/elv-client-js",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
package/src/HttpClient.js CHANGED
@@ -2,6 +2,7 @@ const URI = require("urijs");
2
2
  const Fetch = typeof fetch !== "undefined" ? fetch : require("node-fetch").default;
3
3
  const {LogMessage} = require("./LogMessage");
4
4
  const Utils = require("./Utils");
5
+ const UrlJoin = require("url-join");
5
6
 
6
7
  class HttpClient {
7
8
  Log(message, error=false) {
@@ -83,7 +84,7 @@ class HttpClient {
83
84
  }
84
85
 
85
86
  let uri = baseURI
86
- .path(path)
87
+ .path(UrlJoin(baseURI.path(), path).replace("/as/as", "/as"))
87
88
  .query(queryParams)
88
89
  .hash("");
89
90
 
@@ -237,7 +238,7 @@ class HttpClient {
237
238
 
238
239
  return (
239
240
  baseURI
240
- .path(path)
241
+ .path(UrlJoin(baseURI.path(), path).replace("/as/as", "/as"))
241
242
  .query(queryParams)
242
243
  .hash("")
243
244
  .toString()
@@ -635,7 +635,7 @@ exports.ContentObjectOwner = async function({objectId, versionHash}) {
635
635
 
636
636
  this.Log(`Retrieving content object owner: ${objectId}`);
637
637
 
638
- return (await this.ContentObject({objectId, versionHash})).content_profile.owner;
638
+ return this.utils.HashToAddress((await this.ContentObject({objectId, versionHash})).content_profile.owner);
639
639
  };
640
640
 
641
641
  /**
@@ -20,7 +20,7 @@ const UrlJoin = require("url-join");
20
20
  exports.CreateShare = async function({objectId, objectIds=[], expiresAt, params={}}) {
21
21
  const tenantId = await this.userProfileClient.TenantContractId();
22
22
  const token = await this.CreateFabricToken({});
23
-
23
+
24
24
  if(objectId) {
25
25
  objectIds = [objectId, ...objectIds]
26
26
  .filter((x, i, a) => x && a.indexOf(x) == i);