diff --git a/src/locales/en.json b/src/locales/en.json index c757e2e..489dcbe 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -23,7 +23,7 @@ "Configure when no further order information is needed prior to order approval.": "Configure when no further order information is needed prior to order approval.", "Confirm": "Confirm", "Control what your customers are allowed to edit on their own when they are editing their order on Re-route Fulfillment.": "Control what your customers are allowed to edit on their own when they are editing their order on Re-route Fulfillment.", - "Country": "{count} country", + "country": "{count} country", "countries": "{count} countries", "Create a new product store": "Create a new product store", "Create deadline days": "Create deadline days", diff --git a/src/services/UserService.ts b/src/services/UserService.ts index 6c1d480..05f0bba 100644 --- a/src/services/UserService.ts +++ b/src/services/UserService.ts @@ -4,7 +4,7 @@ import { hasError } from "@/utils"; const login = async (token: string): Promise => { const url = store.getters["user/getBaseUrl"] - const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url.replace("admin", "available-to-promise") : `${url}/rest/s1/available-to-promise/` : `https://${url}.hotwax.io/rest/s1/available-to-promise/`; + const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url : `${url}/rest/s1/admin/` : `https://${url}.hotwax.io/rest/s1/admin/`; let api_key = "" try { @@ -33,7 +33,7 @@ const login = async (token: string): Promise => { const getUserProfile = async (token: any): Promise => { const url = store.getters["user/getBaseUrl"] - const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url.replace("admin", "available-to-promise") : `${url}/rest/s1/available-to-promise/` : `https://${url}.hotwax.io/rest/s1/available-to-promise/`; + const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url : `${url}/rest/s1/admin/` : `https://${url}.hotwax.io/rest/s1/admin/`; try { const resp = await client({ url: "user/profile", @@ -53,7 +53,7 @@ const getUserProfile = async (token: any): Promise => { const getAvailableTimeZones = async (): Promise => { const url = store.getters["user/getBaseUrl"] - const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url.replace("admin", "available-to-promise") : `${url}/rest/s1/available-to-promise/` : `https://${url}.hotwax.io/rest/s1/available-to-promise/`; + const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url : `${url}/rest/s1/admin/` : `https://${url}.hotwax.io/rest/s1/admin/`; return client({ url: "user/getAvailableTimeZones", method: "get",