diff --git a/src/composables/getUrl.js b/src/composables/getUrl.js new file mode 100644 index 000000000..63eb63c0b --- /dev/null +++ b/src/composables/getUrl.js @@ -0,0 +1,19 @@ +import axios from 'axios'; + +export async function getUrl(route, appName = 'salix') { + let url; + const env = process.env.NODE_ENV === 'development' ? 'dev' : process.env.NODE_ENV; + const filter = { + where: {and: [ + {appName: appName}, + {environment: env} + ]} + }; + + await axios.get('Urls/findOne', {params: {filter}}) + .then(res => { + url = res.data.url + route; + }); + + return url; +} diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue index 2c878b74b..2691bbc51 100644 --- a/src/pages/Claim/Card/ClaimCard.vue +++ b/src/pages/Claim/Card/ClaimCard.vue @@ -1,12 +1,36 @@