Skip to content

Commit 30a0f2d

Browse files
committed
patch working
1 parent 5efca2a commit 30a0f2d

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

services/static-webserver/client/source/class/osparc/desktop/organizations/OrganizationDetails.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ qx.Class.define("osparc.desktop.organizations.OrganizationDetails", {
109109
},
110110

111111
__updateOrganization: function(win, button, orgEditor) {
112-
const groupId = orgEditor.getGroupId();
112+
const groupId = orgEditor.getGid();
113113
const name = orgEditor.getLabel();
114114
const description = orgEditor.getDescription();
115115
const thumbnail = orgEditor.getThumbnail();

services/static-webserver/client/source/class/osparc/desktop/organizations/OrganizationsList.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -288,27 +288,15 @@ qx.Class.define("osparc.desktop.organizations.OrganizationsList", {
288288
},
289289

290290
__updateOrganization: function(win, button, orgEditor) {
291-
const groupId = orgEditor.getGroupId();
291+
const groupId = orgEditor.getGid();
292292
const name = orgEditor.getLabel();
293293
const description = orgEditor.getDescription();
294294
const thumbnail = orgEditor.getThumbnail();
295-
const params = {
296-
url: {
297-
"gid": groupId
298-
},
299-
data: {
300-
"label": name,
301-
"description": description,
302-
"thumbnail": thumbnail || null
303-
}
304-
};
305-
osparc.data.Resources.fetch("organizations", "patch", params)
295+
osparc.store.Groups.getInstance().patchGroup(groupId, name, description, thumbnail)
306296
.then(() => {
307297
osparc.FlashMessenger.getInstance().logAs(name + this.tr(" successfully edited"));
308298
button.setFetching(false);
309299
win.close();
310-
osparc.store.Store.getInstance().reset("organizations");
311-
this.reloadOrganizations();
312300
})
313301
.catch(err => {
314302
osparc.FlashMessenger.getInstance().logAs(this.tr("Something went wrong editing ") + name, "ERROR");

0 commit comments

Comments
 (0)