Merge pull request 'refactor: refs #6818 change channel source' (!932) from 6818-useDefaultChannel into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #932 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
84802cf267
|
@ -17,19 +17,12 @@ const config = reactive({
|
|||
const type = Object.keys(config).find((key) => key in useAttrs()) || 'sip';
|
||||
|
||||
onBeforeMount(async () => {
|
||||
let url;
|
||||
let { channel } = config[type];
|
||||
|
||||
if (type === 'say-simple') {
|
||||
url = (await axios.get('SaySimpleConfigs/findOne')).data.url;
|
||||
if (!channel)
|
||||
channel = (
|
||||
await axios.get('SaySimpleCountries/findOne', {
|
||||
params: {
|
||||
filter: { fields: ['channel'], where: { countryFk: 0 } },
|
||||
},
|
||||
})
|
||||
).data?.channel;
|
||||
const { url, defaultChannel } = (await axios.get('SaySimpleConfigs/findOne'))
|
||||
.data;
|
||||
if (!channel) channel = defaultChannel;
|
||||
|
||||
config[
|
||||
type
|
||||
|
|
Loading…
Reference in New Issue