import axios from 'axios'; export async function getUrl(route, appName = 'salix') { const filter = { where: { and: [{ appName: appName }, { environment: process.env.NODE_ENV }] }, }; const { data } = await axios.get('Urls/findOne', { params: { filter } }); const url = data.url; return route ? url + route : url; }