Skip to content

Commit 27b2737

Browse files
committed
deprecate old endpoints
1 parent 4ca666e commit 27b2737

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

services/static-webserver/client/source/class/osparc/data/Resources.js

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,33 +1176,25 @@ qx.Class.define("osparc.data.Resources", {
11761176
"storageLocations": {
11771177
useCache: true,
11781178
endpoints: {
1179-
get: {
1179+
getLocations: {
11801180
method: "GET",
11811181
url: statics.API + "/storage/locations"
11821182
}
11831183
}
11841184
},
11851185
/*
1186-
* STORAGE DATASETS
1186+
* STORAGE
11871187
*/
1188-
"storageDatasets": {
1188+
"storageFiles": {
11891189
useCache: false,
11901190
endpoints: {
11911191
getByLocation: {
11921192
method: "GET",
1193-
url: statics.API + "/storage/locations/{locationId}/datasets"
1194-
}
1195-
}
1196-
},
1197-
/*
1198-
* STORAGE FILES
1199-
*/
1200-
"storageFiles": {
1201-
useCache: false,
1202-
endpoints: {
1203-
getByLocationAndDataset: {
1193+
url: statics.API + "/storage/locations/{locationId}/files/metadata"
1194+
},
1195+
getByStudy: {
12041196
method: "GET",
1205-
url: statics.API + "/storage/locations/{locationId}/datasets/{datasetId}/metadata"
1197+
url: statics.API + "/storage/locations/0/files/metadata?uuid_filter={studyId}"
12061198
},
12071199
getByNode: {
12081200
method: "GET",

services/static-webserver/client/source/class/osparc/file/FilePicker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ qx.Class.define("osparc.file.FilePicker", {
155155
const params = {
156156
url: {
157157
locationId: outValue.store,
158-
datasetId: outValue.dataset
158+
studyId: outValue.dataset
159159
}
160160
};
161-
osparc.data.Resources.fetch("storageFiles", "getByLocationAndDataset", params)
161+
osparc.data.Resources.fetch("storageFiles", "getByStudy", params)
162162
.then(files => {
163163
const fileMetadata = files.find(file => file.file_id === outValue.path);
164164
if (fileMetadata) {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ qx.Class.define("osparc.store.Data", {
6363
resolve(cachedData);
6464
} else {
6565
// Get available storage locations
66-
osparc.data.Resources.get("storageLocations")
66+
osparc.data.Resources.fetch("storageLocations", "getLocations")
6767
.then(locations => {
6868
// Add them to cache
6969
this.__locationsCached = locations;
@@ -109,7 +109,7 @@ qx.Class.define("osparc.store.Data", {
109109
locationId
110110
}
111111
};
112-
osparc.data.Resources.fetch("storageDatasets", "getByLocation", params)
112+
osparc.data.Resources.fetch("storageFiles", "getByLocation", params)
113113
.then(datasets => {
114114
const data = {
115115
location: locationId,
@@ -162,10 +162,10 @@ qx.Class.define("osparc.store.Data", {
162162
const params = {
163163
url: {
164164
locationId,
165-
datasetId
165+
studyId: datasetId
166166
}
167167
};
168-
osparc.data.Resources.fetch("storageFiles", "getByLocationAndDataset", params)
168+
osparc.data.Resources.fetch("storageFiles", "getByStudy", params)
169169
.then(files => {
170170
const data = {
171171
location: locationId,

0 commit comments

Comments
 (0)