This commit is contained in:
Expand-sys 2021-10-21 11:42:39 +11:00
parent 0adca45bcf
commit c7783f508c

View file

@ -45,8 +45,8 @@ fastify.register(require("point-of-view"), {
root: path.join(__dirname, "views"), root: path.join(__dirname, "views"),
}); });
const api = process.env.BANKAPIURL; const api = `${process.env.BANKAPIURL}`;
console.log(api);
function papy() { function papy() {
const rndInt = Math.floor(Math.random() * 1337); const rndInt = Math.floor(Math.random() * 1337);
let random = false; let random = false;
@ -92,7 +92,8 @@ fastify.get("/", async function (req, res) {
if (process.env.SETUP == false || !process.env.SETUP) { if (process.env.SETUP == false || !process.env.SETUP) {
res.view("setup"); res.view("setup");
} else { } else {
let checkalive = await got(`${api}/../properties`, { console.log(`${api}../properties`);
let checkalive = await got(`${api}../properties`, {
headers: { headers: {
Accept: "application/json", Accept: "application/json",
}, },