Skip to content

Commit

Permalink
fix: request data format
Browse files Browse the repository at this point in the history
  • Loading branch information
yoojinko committed Oct 23, 2023
1 parent 77dddb7 commit 6242583
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export enum RESPONSE_STATUS {
}

export type request = {
requestData: string,
requestData: any,
requesterAddress: string,
requestKey: string,
appName: string,
Expand Down

0 comments on commit 6242583

Please sign in to comment.