From b49ccadac47a4fb20b057a39ebdf3b139f0a98e5 Mon Sep 17 00:00:00 2001 From: TheFirstSpine Date: Tue, 23 Jan 2024 19:50:32 +0100 Subject: [PATCH] Updated REST to Game Assets --- api/controllers/PnpController.js | 4 ++-- api/helpers/get-card.js | 2 +- views/components/card-autoload.ejs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/controllers/PnpController.js b/api/controllers/PnpController.js index ef0c276..35f7d16 100644 --- a/api/controllers/PnpController.js +++ b/api/controllers/PnpController.js @@ -32,7 +32,7 @@ module.exports = { }); const destinies = await Promise.all(destiniesToFetch.map(async (d) => { - const response = await axios.get(`${process.env.REST_URL}/rest/decks/${d}`); + const response = await axios.get(`${process.env.GAME_ASSETS_URL}/rest/decks/${d}`); return response.data; })); @@ -44,7 +44,7 @@ module.exports = { return req.query[d] === '1'; }); const origins = await Promise.all(originsToFetch.map(async (d) => { - const response = await axios.get(`${process.env.REST_URL}/rest/decks/${d}`); + const response = await axios.get(`${process.env.GAME_ASSETS_URL}/rest/decks/${d}`); return response.data; })); diff --git a/api/helpers/get-card.js b/api/helpers/get-card.js index 09c9467..a8221ea 100644 --- a/api/helpers/get-card.js +++ b/api/helpers/get-card.js @@ -11,7 +11,7 @@ module.exports = { fn: async function(inputs, exits) { try { - const baseUrl = process.env.REST_URL; + const baseUrl = process.env.GAME_ASSETS_URL; const url = `${baseUrl}/rest/cards/${inputs.id}`; const result = await axios.get(url); const resultJson = result.data; diff --git a/views/components/card-autoload.ejs b/views/components/card-autoload.ejs index 8720447..5d8e01a 100644 --- a/views/components/card-autoload.ejs +++ b/views/components/card-autoload.ejs @@ -9,7 +9,7 @@ }, mounted: async function() { const cardId = this.$attrs.cardid; - const response = await fetch(`<%= process.env.REST_URL %>/rest/cards/${cardId}`); + const response = await fetch(`<%= process.env.GAME_ASSETS_URL %>/rest/cards/${cardId}`); this.cardStyle = this.$attrs.cardstyle; this.card = await response.json(); },