From 9ebe43510f429c8342fac07e2f65df81621a4660 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 29 Nov 2018 08:45:10 +0100 Subject: [PATCH] added logging of brizo args --- src/brizo/Brizo.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index f28d969..974e258 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -1,4 +1,5 @@ import Config from "../models/Config" +import Logger from "../utils/Logger" import WebServiceConnectorProvider from "../utils/WebServiceConnectorProvider" const apiPath = "/api/v1/brizo/services" @@ -31,17 +32,21 @@ export default class Brizo { signature: string, consumerAddress: string): Promise { + const args = { + did, + serviceAgreementId, + serviceDefinitionId, + signature, + consumerAddress, + } + + Logger.log(args) + return WebServiceConnectorProvider .getConnector() .post( `${this.url}${apiPath}/access/initialize`, - JSON.stringify({ - did, - serviceAgreementId, - serviceDefinitionId, - signature, - consumerAddress, - }), + decodeURI(JSON.stringify(args)), ) }