File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,9 @@ class App extends Component {
102
102
}
103
103
104
104
finalApplicationJson ( api ) {
105
+ if ( typeof ( api . application_json ) == 'object' ) {
106
+ api . application_json = JSON . stringify ( api . application_json ) ;
107
+ }
105
108
let newString = this . replaceVarInString ( api , api . application_json ) ;
106
109
let result = { } ;
107
110
if ( newString ) {
Original file line number Diff line number Diff line change @@ -55,16 +55,16 @@ class EditApiDialog extends Component {
55
55
}
56
56
57
57
onClickSave = ( ) => {
58
- var dist = { }
59
- Object . assign ( dist , this . state . api ) ;
60
- try {
61
- dist [ 'input' ] = JSON . parse ( dist . input ) ;
62
- }
63
- catch ( error ) {
64
- dist [ 'input' ] = { }
65
- } ;
66
-
67
- this . props . onSave ( dist ) ;
58
+ var dst = { }
59
+ Object . keys ( this . state . api ) . forEach ( ( ele ) => {
60
+ try {
61
+ dst [ ele ] = JSON . parse ( this . state . api [ ele ] ) ;
62
+ } catch ( error ) {
63
+ dst [ ele ] = this . state . api [ ele ] ;
64
+ }
65
+ } ) ;
66
+
67
+ this . props . onSave ( dst ) ;
68
68
}
69
69
70
70
inputChanged = ( ele ) => {
Original file line number Diff line number Diff line change 1
1
2
- const Host = '/testsets/' ;
3
-
2
+ // const Host = 'http://139.180.139.19:8999 /testsets/';
3
+ const Host = '/testsets/'
4
4
5
5
export function get_set_list ( cb ) {
6
6
fetch ( Host ) . then ( ( resp ) => {
You can’t perform that action at this time.
0 commit comments