Browse Source

fix issue #77

develop
Simon Vieille 2 weeks ago
parent
commit
a6dd6854e4
  1. 1
      lib/Controller/PersonalSettingController.php
  2. 9
      src/admin.js

1
lib/Controller/PersonalSettingController.php

@ -54,6 +54,7 @@ class PersonalSettingController extends Controller
/**
* @NoAdminRequired
* @NoCSRFRequired
*
* @param mixed $name
* @param mixed $value

9
src/admin.js

@ -21,16 +21,17 @@ const selector = '#side-menu-message'
const userConfig = (name, value, callbacks) => {
const url = OC.generateUrl('/apps/side_menu/personalSetting/valueSet')
const formData = new FormData()
formData.append('name', name)
formData.append('value', value)
const formData = []
formData.push('name=' + encodeURIComponent(name))
formData.push('value=' + encodeURIComponent(value))
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: formData
body: formData.join('&')
})
.then(callbacks.success)
.catch(callbacks.error)

Loading…
Cancel
Save