submit advanced
This commit is contained in:
parent
18c5b3c742
commit
7900ad5e09
@ -65,11 +65,11 @@ function setTitle(input: string): string {
|
||||
}
|
||||
|
||||
async function onSubmitAdvanced() {
|
||||
const update = await configStore.setPlayoutConfig(configStore.playout)
|
||||
const update = await configStore.setAdvancedConfig()
|
||||
configStore.onetimeInfo = true
|
||||
|
||||
if (update.status === 200) {
|
||||
indexStore.msgAlert('success', t('config.updatePlayoutSuccess'), 2)
|
||||
indexStore.msgAlert('success', t('advanced.updateSuccess'), 2)
|
||||
|
||||
const channel = configStore.configChannel[configStore.configID].id
|
||||
|
||||
@ -83,7 +83,7 @@ async function onSubmitAdvanced() {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
indexStore.msgAlert('error', t('config.updatePlayoutFailed'), 2)
|
||||
indexStore.msgAlert('error', t('advanced.updateFailed'), 2)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,6 +143,8 @@ export default {
|
||||
encoder: 'Encoder',
|
||||
filter: 'Filter',
|
||||
ingest: 'Ingest',
|
||||
updateSuccess: 'Update advanced config success!',
|
||||
updateFailed: 'Update advanced config failed!',
|
||||
},
|
||||
config: {
|
||||
channel: 'Kanal',
|
||||
|
@ -143,6 +143,8 @@ export default {
|
||||
encoder: 'Encoder',
|
||||
filter: 'Filter',
|
||||
ingest: 'Ingest',
|
||||
updateSuccess: 'Update advanced config success!',
|
||||
updateFailed: 'Update advanced config failed!',
|
||||
},
|
||||
config: {
|
||||
channel: 'Channel',
|
||||
|
@ -143,6 +143,8 @@ export default {
|
||||
encoder: 'Encoder',
|
||||
filter: 'Filter',
|
||||
ingest: 'Ingest',
|
||||
updateSuccess: 'Update advanced config success!',
|
||||
updateFailed: 'Update advanced config failed!',
|
||||
},
|
||||
config: {
|
||||
channel: 'Canal',
|
||||
|
@ -143,6 +143,8 @@ export default {
|
||||
encoder: 'Encoder',
|
||||
filter: 'Filter',
|
||||
ingest: 'Ingest',
|
||||
updateSuccess: 'Update advanced config success!',
|
||||
updateFailed: 'Update advanced config failed!',
|
||||
},
|
||||
config: {
|
||||
channel: 'Канал',
|
||||
|
@ -187,6 +187,19 @@ export const useConfig = defineStore('config', {
|
||||
return update
|
||||
},
|
||||
|
||||
async setAdvancedConfig() {
|
||||
const authStore = useAuth()
|
||||
const channel = this.configChannel[this.configID].id
|
||||
|
||||
const update = await fetch(`/api/playout/advanced/${channel}`, {
|
||||
method: 'PUT',
|
||||
headers: { ...this.contentType, ...authStore.authHeader },
|
||||
body: JSON.stringify(this.advanced),
|
||||
})
|
||||
|
||||
return update
|
||||
},
|
||||
|
||||
async getUserConfig() {
|
||||
const authStore = useAuth()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user