Skip to content

Commit

Permalink
refactor: serviceName
Browse files Browse the repository at this point in the history
  • Loading branch information
akastercomcom committed Sep 19, 2023
1 parent 264877c commit c1f46c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/modules/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ export default class Admin extends ModuleBase {
* @returns RequestData type.
*/
getDataFromServiceRequest(req: Request) {
if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[5] || !req.body.value.prompt) {
if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[4] || !req.body.value.prompt) {
throw new Error("Not from service request");
}
const requestData: request = {
appName: req.body.valuePath[1],
requesterAddress: req.body.auth.addr,
requestKey: req.body.valuePath[5],
requestKey: req.body.valuePath[4],
requestData: req.body.value.prompt,
}
return requestData;
Expand Down
3 changes: 1 addition & 2 deletions src/modules/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ export default class App extends ModuleBase {
".rule": {
write:
"auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " +
"(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`)) || " +
"getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`)"
"(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))"
}
}
},
Expand Down

0 comments on commit c1f46c4

Please sign in to comment.