Some missing async handling.
This commit is contained in:
parent
2007543c98
commit
3857700ea0
|
@ -79,8 +79,8 @@
|
||||||
.map(([key]) => key)
|
.map(([key]) => key)
|
||||||
}
|
}
|
||||||
|
|
||||||
function save(data) {
|
async function save(data) {
|
||||||
environment.createVariable(data)
|
await environment.createVariable(data)
|
||||||
config[selectedKey] = `{{ env.${data.name} }}`
|
config[selectedKey] = `{{ env.${data.name} }}`
|
||||||
createVariableModal.hide()
|
createVariableModal.hide()
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,8 +171,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const save = data => {
|
const save = async data => {
|
||||||
environment.createVariable(data)
|
await environment.createVariable(data)
|
||||||
form.basic[formFieldkey] = `{{ env.${data.name} }}`
|
form.basic[formFieldkey] = `{{ env.${data.name} }}`
|
||||||
createVariableModal.hide()
|
createVariableModal.hide()
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
let developmentValue
|
let developmentValue
|
||||||
let useProductionValue = true
|
let useProductionValue = true
|
||||||
|
|
||||||
const deleteVariable = name => {
|
const deleteVariable = async name => {
|
||||||
try {
|
try {
|
||||||
environment.deleteVariable(name)
|
await environment.deleteVariable(name)
|
||||||
modalContext.hide()
|
modalContext.hide()
|
||||||
notifications.success("Environment variable deleted")
|
notifications.success("Environment variable deleted")
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -32,9 +32,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const saveVariable = () => {
|
const saveVariable = async () => {
|
||||||
try {
|
try {
|
||||||
save({
|
await save({
|
||||||
name,
|
name,
|
||||||
production: productionValue,
|
production: productionValue,
|
||||||
development: developmentValue,
|
development: developmentValue,
|
||||||
|
|
Loading…
Reference in New Issue