refactor: refs #6818 change channel source
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
e57a253c6f
commit
c4a4f7fcd6
|
@ -17,19 +17,12 @@ const config = reactive({
|
||||||
const type = Object.keys(config).find((key) => key in useAttrs()) || 'sip';
|
const type = Object.keys(config).find((key) => key in useAttrs()) || 'sip';
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
let url;
|
|
||||||
let { channel } = config[type];
|
let { channel } = config[type];
|
||||||
|
|
||||||
if (type === 'say-simple') {
|
if (type === 'say-simple') {
|
||||||
url = (await axios.get('SaySimpleConfigs/findOne')).data.url;
|
const { url, defaultChannel } = (await axios.get('SaySimpleConfigs/findOne'))
|
||||||
if (!channel)
|
.data;
|
||||||
channel = (
|
if (!channel) channel = defaultChannel;
|
||||||
await axios.get('SaySimpleCountries/findOne', {
|
|
||||||
params: {
|
|
||||||
filter: { fields: ['channel'], where: { countryFk: 0 } },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
).data?.channel;
|
|
||||||
|
|
||||||
config[
|
config[
|
||||||
type
|
type
|
||||||
|
|
Loading…
Reference in New Issue