1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

added logging of brizo args

This commit is contained in:
Sebastian Gerske 2018-11-29 08:45:10 +01:00
parent f65bb4e050
commit 9ebe43510f

View File

@ -1,4 +1,5 @@
import Config from "../models/Config" import Config from "../models/Config"
import Logger from "../utils/Logger"
import WebServiceConnectorProvider from "../utils/WebServiceConnectorProvider" import WebServiceConnectorProvider from "../utils/WebServiceConnectorProvider"
const apiPath = "/api/v1/brizo/services" const apiPath = "/api/v1/brizo/services"
@ -31,17 +32,21 @@ export default class Brizo {
signature: string, signature: string,
consumerAddress: string): Promise<any> { consumerAddress: string): Promise<any> {
const args = {
did,
serviceAgreementId,
serviceDefinitionId,
signature,
consumerAddress,
}
Logger.log(args)
return WebServiceConnectorProvider return WebServiceConnectorProvider
.getConnector() .getConnector()
.post( .post(
`${this.url}${apiPath}/access/initialize`, `${this.url}${apiPath}/access/initialize`,
JSON.stringify({ decodeURI(JSON.stringify(args)),
did,
serviceAgreementId,
serviceDefinitionId,
signature,
consumerAddress,
}),
) )
} }