Update config
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user