fix domain env

This commit is contained in:
Raven Scott 2022-01-24 23:45:16 +00:00
parent 1be59e5543
commit c1640af4c1
4 changed files with 4 additions and 4 deletions

View File

@ -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({

View File

@ -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',

View File

@ -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({

View File

@ -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({