diff --git a/src/internal.ts b/src/internal.ts index 1fa53c3..cd96ea0 100644 --- a/src/internal.ts +++ b/src/internal.ts @@ -35,14 +35,14 @@ export default class Internal { } getDataFromServiceRequest(req: Request) { - if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[4] || !req.body.value.prompt) { + if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[4] || !req.body.value) { throw new Error("Not from service request"); } const requestData: request = { appName: req.body.valuePath[1], requesterAddress: req.body.auth.addr, requestKey: req.body.valuePath[4], - requestData: req.body.value.prompt, + requestData: req.body.value, } return requestData; } diff --git a/src/types/type.ts b/src/types/type.ts index d02b153..6a20e08 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -61,7 +61,7 @@ export enum RESPONSE_STATUS { } export type request = { - requestData: string, + requestData: any, requesterAddress: string, requestKey: string, appName: string,