зеркало из https://github.com/nextcloud/forms.git
Fix Save Form
Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
This commit is contained in:
Родитель
0038a6d4b0
Коммит
d0897441eb
|
@ -35,9 +35,9 @@ return [
|
|||
['name' => 'page#insert_submission', 'url' => '/insert/submission', 'verb' => 'POST'],
|
||||
|
||||
['name' => 'api#getForms', 'url' => '/api/v1/forms', 'verb' => 'GET'],
|
||||
['name' => 'api#newForm', 'url' => '/api/v1/form', 'verb' => 'POST'],
|
||||
['name' => 'api#getForm', 'url' => '/api/v1/form/{id}', 'verb' => 'GET'],
|
||||
['name' => 'api#updateForm', 'url' => '/api/v1/form/update/', 'verb' => 'POST'],
|
||||
['name' => 'api#updateForm', 'url' => '/api/v1/form/update', 'verb' => 'POST'],
|
||||
['name' => 'api#newForm', 'url' => '/api/v1/form', 'verb' => 'POST'],
|
||||
['name' => 'api#deleteForm', 'url' => '/api/v1/form/{id}', 'verb' => 'DELETE'],
|
||||
['name' => 'api#updateQuestion', 'url' => '/api/v1/question/update', 'verb' => 'POST'],
|
||||
['name' => 'api#reorderQuestions', 'url' => '/api/v1/question/reorder', 'verb' => 'POST'],
|
||||
|
|
|
@ -240,7 +240,7 @@ export default {
|
|||
async saveFormProperty(key) {
|
||||
try {
|
||||
// TODO: add loading status feedback ?
|
||||
await axios.post(OC.generateUrl('/apps/forms/api/v1/question/update'), {
|
||||
await axios.post(generateUrl('/apps/forms/api/v1/form/update'), {
|
||||
id: this.form.id,
|
||||
keyValuePairs: {
|
||||
[key]: this.form[key],
|
||||
|
@ -329,7 +329,7 @@ export default {
|
|||
const newOrder = this.form.questions.map(question => question.id)
|
||||
|
||||
try {
|
||||
await axios.post(OC.generateUrl('/apps/forms/api/v1/question/reorder'), {
|
||||
await axios.post(generateUrl('/apps/forms/api/v1/question/reorder'), {
|
||||
formId: this.form.id,
|
||||
newOrder,
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче