refactor .env usage due to unexpexted env values
This commit is contained in:
@ -26,7 +26,7 @@ export const getServerSideProps = async (context) => {
|
||||
|
||||
const axios = await axiosServer(context);
|
||||
const locations = await axios
|
||||
.get(`${process.env.NEXTAUTH_URL}/api/data/locations?select=id,name`)
|
||||
.get(`${process.env.PUBLIC_URL}/api/data/locations?select=id,name`)
|
||||
.then((res) => {
|
||||
console.log("locations: " + JSON.stringify(res.data));
|
||||
return res.data;
|
||||
@ -41,7 +41,7 @@ export const getServerSideProps = async (context) => {
|
||||
|
||||
const { id } = context.query.id;
|
||||
const { data: item } = await axiosInstance.get(
|
||||
process.env.NEXTAUTH_URL + "/api/data/cartevents/" + context.params.id
|
||||
process.env.PUBLIC_URL + "/api/data/cartevents/" + context.params.id
|
||||
);
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user