Skip to content

Commit d971ba2

Browse files
committed
more patching
1 parent 5057505 commit d971ba2

File tree

1 file changed

+4
-15
lines changed
  • services/static-webserver/client/source/class/osparc/store

1 file changed

+4
-15
lines changed

services/static-webserver/client/source/class/osparc/store/Study.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,7 @@ qx.Class.define("osparc.store.Study", {
126126

127127
const patchData = {};
128128
patchData[fieldKey] = value;
129-
const params = {
130-
url: {
131-
"studyId": studyData["uuid"]
132-
},
133-
data: patchData
134-
};
135-
return osparc.data.Resources.fetch("studies", "patch", params)
129+
return this.patchStudy(studyData["uuid"], patchData)
136130
.then(() => {
137131
studyData[fieldKey] = value;
138132
// A bit hacky, but it's not sent back to the backend
@@ -141,15 +135,10 @@ qx.Class.define("osparc.store.Study", {
141135
},
142136

143137
patchTemplateType: function(templateId, templateType) {
144-
const params = {
145-
url: {
146-
"studyId": templateId
147-
},
148-
data: {
149-
"templateType": templateType,
150-
}
138+
const patchData = {
139+
"templateType": templateType,
151140
};
152-
return osparc.data.Resources.fetch("studies", "patch", params)
141+
return this.patchStudy(templateId, patchData)
153142
.catch(err => osparc.FlashMessenger.logError(err));
154143
},
155144

0 commit comments

Comments
 (0)