@lancom/shared 0.0.92 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/api/helpers.js +2 -1
- package/nuxt.config.js +2 -2
- package/package.json +1 -1
package/assets/js/api/helpers.js
CHANGED
|
@@ -17,7 +17,8 @@ if (process.client) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const API_URL = process.client ? process.env.API_URL : process.env.LOCAL_API_URL;
|
|
21
|
+
export const buildPath = path => `${API_URL}/${path}`;
|
|
21
22
|
|
|
22
23
|
export const prepareHeaders = method => {
|
|
23
24
|
const headers = {};
|
package/nuxt.config.js
CHANGED
|
@@ -32,7 +32,7 @@ module.exports = (config, axios) => ({
|
|
|
32
32
|
'/customer/**'
|
|
33
33
|
],
|
|
34
34
|
routes: async () => {
|
|
35
|
-
const { data } = await axios.get(`${config.
|
|
35
|
+
const { data } = await axios.get(`${config.LOCAL_API_URL}/feed/sitemap?host=${config.HOST_NAME}`);
|
|
36
36
|
return data.map(url => ({ url, priority: 0.8 }));
|
|
37
37
|
}
|
|
38
38
|
},
|
|
@@ -82,7 +82,7 @@ module.exports = (config, axios) => ({
|
|
|
82
82
|
feed: [{
|
|
83
83
|
path: '/google-shopping.xml',
|
|
84
84
|
async get() {
|
|
85
|
-
const { data } = await axios.get(`${config.
|
|
85
|
+
const { data } = await axios.get(`${config.LOCAL_API_URL}/feed/products?host=${config.HOST_NAME}`);
|
|
86
86
|
const spliceFirstImage = images => (images || []).splice(0, 1)[0];
|
|
87
87
|
const getImages = images => (images || []).length > 0 ? images : null;
|
|
88
88
|
return {
|