diff --git a/package-lock.json b/package-lock.json index 6111184b0..378f7329e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "origintrail_node", - "version": "8.0.0-sigma.18", + "version": "8.0.0-sigma.19", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "origintrail_node", - "version": "8.0.0-sigma.18", + "version": "8.0.0-sigma.19", "license": "ISC", "dependencies": { "@comunica/query-sparql": "^2.4.3", diff --git a/package.json b/package.json index 6a5db1480..b017311a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "8.0.0-sigma.18", + "version": "8.0.0-sigma.19", "description": "OTNode V8", "main": "index.js", "type": "module", diff --git a/src/controllers/http-api/v0/get-http-api-controller-v0.js b/src/controllers/http-api/v0/get-http-api-controller-v0.js index 02b66bb6f..12d06b65a 100644 --- a/src/controllers/http-api/v0/get-http-api-controller-v0.js +++ b/src/controllers/http-api/v0/get-http-api-controller-v0.js @@ -54,10 +54,12 @@ class GetController extends BaseController { let knowledgeCollectionId; let knowledgeAssetId; try { - const { id, paranetUAL, includeMetadata, contentType } = req.body; + const { paranetUAL, includeMetadata, contentType } = req.body; + let { id } = req.body; ({ blockchain, contract, knowledgeCollectionId, knowledgeAssetId } = this.ualService.resolveUAL(id)); - + contract = contract.toLowerCase(); + id = this.ualService.deriveUAL(blockchain, contract, knowledgeAssetId); this.logger.info(`Get for ${id} with operation id ${operationId} initiated.`); // Get assertionId - datasetRoot diff --git a/src/controllers/http-api/v1/get-http-api-controller-v1.js b/src/controllers/http-api/v1/get-http-api-controller-v1.js index bace47ba6..064b97416 100644 --- a/src/controllers/http-api/v1/get-http-api-controller-v1.js +++ b/src/controllers/http-api/v1/get-http-api-controller-v1.js @@ -54,9 +54,12 @@ class GetController extends BaseController { let knowledgeCollectionId; let knowledgeAssetId; try { - const { id, paranetUAL, includeMetadata, contentType } = req.body; + const { paranetUAL, includeMetadata, contentType } = req.body; + let { id } = req.body; ({ blockchain, contract, knowledgeCollectionId, knowledgeAssetId } = this.ualService.resolveUAL(id)); + contract = contract.toLowerCase(); + id = this.ualService.deriveUAL(blockchain, contract, knowledgeAssetId); this.logger.info(`Get for ${id} with operation id ${operationId} initiated.`);