diff --git a/commands/register.js b/commands/register.js index a726f95..a940390 100644 --- a/commands/register.js +++ b/commands/register.js @@ -18,7 +18,7 @@ exports.run = (client, message, args, level) => { // eslint-disable-line no-unus // Setting up our Request, using getUserByName method - var Request = http.get('https://board.grwh.work/jsonrpc.php').headers({ Accept: 'application/json', 'Content-Type': 'application/json' }).send({ "jsonrpc": "2.0", "method": "getUserByName", "id": 0, "params": { "username": username[0] } }); + var Request = http.get('https://' + process.env.ROOT_DOMAIN + '/jsonrpc.php').headers({ Accept: 'application/json', 'Content-Type': 'application/json' }).send({ "jsonrpc": "2.0", "method": "getUserByName", "id": 0, "params": { "username": username[0] } }); // Begin the request and send authenication using the jsonrpc2.0 protocol. Request.auth({ diff --git a/slash/create_task.js b/slash/create_task.js index 4fb1900..c740c79 100644 --- a/slash/create_task.js +++ b/slash/create_task.js @@ -13,7 +13,7 @@ exports.run = async (client, interaction) => { await interaction.deferReply(); // const reply = await interaction.editReply("Ping?"); // await interaction.editReply(`Pong! Latency is ${reply.createdTimestamp - interaction.createdTimestamp}ms. API Latency is ${Math.round(client.ws.ping)}ms.`); - var Request = http.post('https://board.grwh.work/jsonrpc.php').headers({ Accept: 'application/json', 'Content-Type': 'application/json' }).send({ "jsonrpc": "2.0", "method": "getAllProjects", "id": 0 }); + var Request = http.post('https://' + process.env.ROOT_DOMAIN + '/jsonrpc.php').headers({ Accept: 'application/json', 'Content-Type': 'application/json' }).send({ "jsonrpc": "2.0", "method": "getAllProjects", "id": 0 }); Request.auth({ user: 'jsonrpc', diff --git a/slash/getBoardDetails.js b/slash/getBoardDetails.js index f2a1f49..d677043 100644 --- a/slash/getBoardDetails.js +++ b/slash/getBoardDetails.js @@ -62,7 +62,7 @@ exports.run = async (client, interaction) => { await interaction.update({ content: '󠀠', components: [] }); console.log(interaction.values[0]); - var Request = http.get('https://board.grwh.work/jsonrpc.php').headers({ Accept: 'application/json', 'Content-Type': 'application/json' }).send({ "jsonrpc": "2.0", "method": "getBoard", "id": 0, "params": [interaction.values[0]] }); + var Request = http.get('https://' + process.env.ROOT_DOMAIN + '/jsonrpc.php').headers({ Accept: 'application/json', 'Content-Type': 'application/json' }).send({ "jsonrpc": "2.0", "method": "getBoard", "id": 0, "params": [interaction.values[0]] }); // Begin the request and send authenication using the jsonrpc2.0 protocol. Request.auth({ diff --git a/slash/list_projects.js b/slash/list_projects.js index 1eafd2e..fab5d3e 100644 --- a/slash/list_projects.js +++ b/slash/list_projects.js @@ -34,7 +34,7 @@ exports.run = async (client, interaction) => { await interaction.deferReply(); // Setting up our Request, using getAllProjects method - var Request = http.get('https://board.grwh.work/jsonrpc.php').headers({ Accept: 'application/json', 'Content-Type': 'application/json' }).send({ "jsonrpc": "2.0", "method": "getAllProjects", "id": 0 }); + var Request = http.get('https://' + process.env.ROOT_DOMAIN + '/jsonrpc.php').headers({ Accept: 'application/json', 'Content-Type': 'application/json' }).send({ "jsonrpc": "2.0", "method": "getAllProjects", "id": 0 }); // Begin the request and send authenication using the jsonrpc2.0 protocol. Request.auth({