Skip to content

Commit

Permalink
Updated REST to Game Assets
Browse files Browse the repository at this point in the history
  • Loading branch information
thefirstspine committed Jan 23, 2024
1 parent 4f64ad5 commit b49ccad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/controllers/PnpController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}));

Expand All @@ -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;
}));

Expand Down
2 changes: 1 addition & 1 deletion api/helpers/get-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion views/components/card-autoload.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
Expand Down

0 comments on commit b49ccad

Please sign in to comment.