Made 'url' property a function of applicationAbbreviation
This commit is contained in:
parent
c716716449
commit
f2efea76b5
3 changed files with 10 additions and 9 deletions
|
|
@ -7,6 +7,7 @@ const applicationConfig = {
|
||||||
COOKIE_PATH: "/",
|
COOKIE_PATH: "/",
|
||||||
CURRENT_ENVIRONMENT: process.env.VUE_APP_CURRENT_ENVIRONMENT, // "Localhost", "Dev", "QA", and "Prod"
|
CURRENT_ENVIRONMENT: process.env.VUE_APP_CURRENT_ENVIRONMENT, // "Localhost", "Dev", "QA", and "Prod"
|
||||||
APPLICATION_NAME: "FixMyGlass",
|
APPLICATION_NAME: "FixMyGlass",
|
||||||
|
APPLICATION_ABBREVIATION: "fmg",
|
||||||
SITE_ENTRY_TRIGGER_VALUE: "FixMyGlass"
|
SITE_ENTRY_TRIGGER_VALUE: "FixMyGlass"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
const endpoints = {
|
const endpoints = {
|
||||||
GetRouteInfo: {
|
GetRouteInfo: {
|
||||||
url: "/content/api/v1/content/RouteInfo",
|
url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/RouteInfo`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
},
|
},
|
||||||
GetHomepageInfo: {
|
GetHomepageInfo: {
|
||||||
url: "/content/api/v1/content/HomepageInfo",
|
url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/HomepageInfo`,
|
||||||
|
method: "GET",
|
||||||
|
},
|
||||||
|
GetPageData: {
|
||||||
|
url: (applicationAbbreviation, pageName) => `/content/api/v1/content/${applicationAbbreviation}/${pageName}`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
},
|
},
|
||||||
GetVehicleYears: {
|
GetVehicleYears: {
|
||||||
|
|
@ -31,10 +35,6 @@ const endpoints = {
|
||||||
url: "/parts/api/v1/parts/damage-options",
|
url: "/parts/api/v1/parts/damage-options",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
},
|
},
|
||||||
GetPageData: {
|
|
||||||
url: "/content/api/v1/content",
|
|
||||||
method: "GET",
|
|
||||||
},
|
|
||||||
LookupVehicleByYmms: {
|
LookupVehicleByYmms: {
|
||||||
url: "/vehicle/api/v1/vehicle/Lookup",
|
url: "/vehicle/api/v1/vehicle/Lookup",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|
|
||||||
|
|
@ -538,7 +538,7 @@ export const actions = {
|
||||||
getRouteInfo(context, { pageName }) {
|
getRouteInfo(context, { pageName }) {
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
method: endpoints.GetRouteInfo.method,
|
method: endpoints.GetRouteInfo.method,
|
||||||
endpoint: endpoints.GetRouteInfo.url,
|
endpoint: endpoints.GetRouteInfo.url(applicationConfig.APPLICATION_ABBREVIATION),
|
||||||
payload: {
|
payload: {
|
||||||
pageName: pageName,
|
pageName: pageName,
|
||||||
},
|
},
|
||||||
|
|
@ -547,13 +547,13 @@ export const actions = {
|
||||||
getHomepageName(context) {
|
getHomepageName(context) {
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
method: endpoints.GetHomepageInfo.method,
|
method: endpoints.GetHomepageInfo.method,
|
||||||
endpoint: endpoints.GetHomepageInfo.url,
|
endpoint: endpoints.GetHomepageInfo.url(applicationConfig.APPLICATION_ABBREVIATION),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getPageData(context, { pageName }) {
|
getPageData(context, { pageName }) {
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
method: endpoints.GetPageData.method,
|
method: endpoints.GetPageData.method,
|
||||||
endpoint: `${endpoints.GetPageData.url}/${pageName}`,
|
endpoint: endpoints.GetPageData.url(applicationConfig.APPLICATION_ABBREVIATION, pageName),
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue