1
0
Fork 0
mirror of synced 2024-08-18 19:41:30 +12:00

Some missing async handling.

This commit is contained in:
mike12345567 2023-01-30 17:03:20 +00:00
parent 2007543c98
commit 3857700ea0
3 changed files with 8 additions and 8 deletions

View file

@ -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()
} }

View file

@ -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()
} }

View file

@ -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,