Request util url changed to env var

This commit is contained in:
Bayram Muhiyev 2021-07-26 13:27:46 +05:00
parent 4dd52b3003
commit bf0b9807e6

View File

@ -4,7 +4,7 @@ interface requestProps {
} }
const request = async ({query, variables}: requestProps) => { const request = async ({query, variables}: requestProps) => {
const data = await fetch('http://localhost:5000/shop-api', { const data = await fetch(String(process.env.NEXT_PUBLIC_VENDURE_SHOP_API_URL), {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
credentials: 'include', credentials: 'include',