fix(admin/*SaveButton): cast settings to string
This commit is contained in:
parent
c2ecc5bf98
commit
520225603b
2 changed files with 4 additions and 4 deletions
|
|
@ -73,10 +73,10 @@ const save = async () => {
|
|||
if (Array.isArray(value) || typeof value === 'object') {
|
||||
value = JSON.stringify(value)
|
||||
} else if (typeof value === 'boolean') {
|
||||
value = value ? 1 : 0
|
||||
value = value ? '1' : '0'
|
||||
}
|
||||
|
||||
OCP.AppConfig.setValue('side_menu', key, value, {
|
||||
OCP.AppConfig.setValue('side_menu', key, value.toString(), {
|
||||
success() {
|
||||
update()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -69,11 +69,11 @@ const save = async () => {
|
|||
if (Array.isArray(value) || typeof value === 'object') {
|
||||
value = JSON.stringify(value)
|
||||
} else if (typeof value === 'boolean') {
|
||||
value = value ? 1 : 0
|
||||
value = value ? '1' : '0'
|
||||
}
|
||||
|
||||
formData.push('name=' + encodeURIComponent(key))
|
||||
formData.push('value=' + encodeURIComponent(value))
|
||||
formData.push('value=' + encodeURIComponent(value.toString()))
|
||||
|
||||
fetch(url, {
|
||||
method: 'POST',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue