Skip to content

Commit

Permalink
Prepend API calls with subdirectory path
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 authored Feb 4, 2021
1 parent 1a84209 commit 1a91015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/AppView/AppView.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function AppView({ setDarkMode }){
myHeaders.append("Authorization", `Bearer ${access_token}`);
let requestOptions = { headers: myHeaders };

const apiResponse = await fetch(`/api/data/${queuesToLoad}`, requestOptions);
const apiResponse = await fetch(`${process.env.PUBLIC_URL}/api/data/${queuesToLoad}`, requestOptions);
const queueJson = await apiResponse.json();
setQueues(queueJson);
} else {
Expand Down Expand Up @@ -140,4 +140,4 @@ export default function AppView({ setDarkMode }){

AppView.propTypes = {};

AppView.defaultProps = {};
AppView.defaultProps = {};

0 comments on commit 1a91015

Please sign in to comment.