Update config

This commit is contained in:
2021-09-24 11:03:38 +02:00
parent 1dbadd5bbe
commit ac538692b9
2 changed files with 10 additions and 6 deletions

View File

@@ -1,4 +1,6 @@
const apiURL: string = process.env.NODE_ENV === 'development' ? `${import.meta.env.VITE_API_GRAPHQL_URL_DEV}` : `${import.meta.env.VITE_API_GRAPHQL_URL_PROD}`
const apiURL: string = process.env.NODE_ENV === 'development'
? `${import.meta.env.VITE_API_URL_DEV}`
: `${import.meta.env.VITE_API_URL_PROD}`
/**
@@ -6,7 +8,7 @@ const apiURL: string = process.env.NODE_ENV === 'development' ? `${import.meta.e
*/
export const fetchAPI = async (query: string) => {
try {
const res = await fetch(apiURL, {
const res = await fetch(`${apiURL}${import.meta.env.VITE_API_GRAPHQL_PATH}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',