diff --git a/module/api/control.php b/module/api/control.php index 2596f1afe7..ced9b1e4f3 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -261,7 +261,6 @@ class api extends control ->add('lib', $struct->lib) ->add('editedBy', $userId) ->add('editedDate', $now) - ->json('attribute') ->get(); $changes = $this->api->updateStruct($structID, $data); @@ -614,7 +613,7 @@ class api extends control { $this->loadModel('tree'); $childModules = $this->tree->getOptionMenu($libID, 'api'); - $select = ($type == 'module') ? html::select('module', $childModules, '', "class='form-control chosen'") : html::select('parent', $childModules, '', "class='form-control chosen'"); + $select = ($type == 'module') ? html::select('module', $childModules, '0', "class='form-control chosen'") : html::select('parent', $childModules, '0', "class='form-control chosen'"); die($select); } diff --git a/module/api/js/create.js b/module/api/js/create.js index 04cc9034de..8845f5bd90 100644 --- a/module/api/js/create.js +++ b/module/api/js/create.js @@ -68,7 +68,7 @@ var app = new Vue({ }, add(data, key, t) { if (t == "header" || t == 'query') { - data.splice(key + 1, 0, this.defaultHeader); + data.splice(key + 1, 0, {...this.defaultHeader}) } } } diff --git a/module/api/js/edit.js b/module/api/js/edit.js index a4085d91cb..25154fa678 100644 --- a/module/api/js/edit.js +++ b/module/api/js/edit.js @@ -14,9 +14,7 @@ var app = new Vue({ body: "", response: "", params: "", - defaultHeader: [ - {field: '', required: '', desc: ''} - ], + defaultHeader: {field: '', required: '', desc: ''}, attr: [], api }, @@ -67,7 +65,6 @@ var app = new Vue({ params: body, query: queryP, } - // console.log(params) this.params = JSON.stringify(params); }, filterParams(data) { @@ -89,8 +86,8 @@ var app = new Vue({ }, add(data, key, t) { if(t == "header" || t == 'query') { - data.splice(key + 1, 0, this.defaultHeader) + data.splice(key + 1, 0, {...this.defaultHeader}) } } } -}) \ No newline at end of file +}) diff --git a/module/api/view/create.html.php b/module/api/view/create.html.php index b77ed21b35..eda21c1102 100644 --- a/module/api/view/create.html.php +++ b/module/api/view/create.html.php @@ -69,7 +69,7 @@ js::set('struct_paramsType', $lang->struct->paramsType); api->module;?> - + diff --git a/module/api/view/edit.html.php b/module/api/view/edit.html.php index 5afab8fa35..54cac85328 100644 --- a/module/api/view/edit.html.php +++ b/module/api/view/edit.html.php @@ -164,7 +164,7 @@ js::set('api', $api); - +
@@ -177,8 +177,8 @@ js::set('api', $api); - - + +