File tree 3 files changed +2
-61
lines changed
services/static-webserver/client/source/class/osparc
3 files changed +2
-61
lines changed Original file line number Diff line number Diff line change @@ -191,10 +191,6 @@ qx.Class.define("osparc.data.Resources", {
191
191
method : "PATCH" ,
192
192
url : statics . API + "/projects/{studyId}"
193
193
} ,
194
- put : {
195
- method : "PUT" ,
196
- url : statics . API + "/projects/{studyId}"
197
- } ,
198
194
delete : {
199
195
method : "DELETE" ,
200
196
url : statics . API + "/projects/{studyId}"
Original file line number Diff line number Diff line change @@ -638,53 +638,6 @@ qx.Class.define("osparc.data.model.Study", {
638
638
const studyData = this . serialize ( ) ;
639
639
return studyData ;
640
640
} ) ;
641
- } ,
642
-
643
- updateStudy : function ( params ) {
644
- return new Promise ( ( resolve , reject ) => {
645
- osparc . data . Resources . fetch ( "studies" , "put" , {
646
- url : {
647
- "studyId" : this . getUuid ( )
648
- } ,
649
- data : {
650
- ...this . serialize ( ) ,
651
- ...params
652
- }
653
- } )
654
- . then ( data => {
655
- this . __updateModel ( data ) ;
656
- qx . event . message . Bus . getInstance ( ) . dispatchByName ( "updateStudy" , data ) ;
657
- resolve ( data ) ;
658
- } )
659
- . catch ( err => reject ( err ) ) ;
660
- } ) ;
661
- } ,
662
-
663
- __updateModel : function ( data ) {
664
- if ( "dev" in data ) {
665
- delete data [ "dev" ] ;
666
- }
667
- Object . keys ( data ) . forEach ( key => {
668
- if ( this . self ( ) . IgnoreModelizationProps . includes ( key ) ) {
669
- delete data [ key ] ;
670
- }
671
- } ) ;
672
-
673
- this . set ( {
674
- ...data ,
675
- creationDate : new Date ( data . creationDate ) ,
676
- lastChangeDate : new Date ( data . lastChangeDate ) ,
677
- workbench : this . getWorkbench ( ) ,
678
- ui : this . getUi ( )
679
- } ) ;
680
-
681
- const nodes = this . getWorkbench ( ) . getNodes ( ) ;
682
- Object . values ( nodes ) . forEach ( node => {
683
- const nodeId = node . getNodeId ( ) ;
684
- if ( nodeId in data . workbench ) {
685
- node . populateStates ( data . workbench [ nodeId ] ) ;
686
- }
687
- } ) ;
688
641
}
689
642
}
690
643
} ) ;
Original file line number Diff line number Diff line change @@ -759,16 +759,8 @@ qx.Class.define("osparc.desktop.StudyEditor", {
759
759
}
760
760
761
761
this . __updatingStudy ++ ;
762
- let updatePromise = null ;
763
- if ( osparc . utils . Utils . isDevelopmentPlatform ( ) ) {
764
- // For now, master deployment only
765
- const studyDiffs = this . __getStudyDiffs ( ) ;
766
- updatePromise = this . getStudy ( ) . patchStudyDelayed ( studyDiffs )
767
- } else {
768
- const newObj = this . getStudy ( ) . serialize ( ) ;
769
- updatePromise = this . getStudy ( ) . updateStudy ( newObj ) ;
770
- }
771
- return updatePromise
762
+ const studyDiffs = this . __getStudyDiffs ( ) ;
763
+ return this . getStudy ( ) . patchStudyDelayed ( studyDiffs )
772
764
. then ( studyData => this . __setStudyDataInBackend ( studyData ) )
773
765
. catch ( error => {
774
766
if ( "status" in error && error . status === 409 ) {
You can’t perform that action at this time.
0 commit comments