Skip to content

Commit

Permalink
Added params
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Nov 5, 2022
1 parent 707d300 commit dd1855d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ async function makeRpc(name, ...params){
app.get('/:rpc', async function(req, res) {
try {
if (allowedRpcs.includes(req.params["rpc"])) {
console.log(req.query);
const params = [];

const params = req.query.params ? req.query.params.split(",") : [];
console.log(params);
const { status, response } = await makeRpc(req.params["rpc"], ...params);
res.status(status).send(response);
} else {
Expand Down

0 comments on commit dd1855d

Please sign in to comment.