aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_services
diff options
context:
space:
mode:
authorSonja Galovic <galovicsonja@gmail.com>2022-05-18 13:52:29 +0200
committerSonja Galovic <galovicsonja@gmail.com>2022-05-18 13:52:29 +0200
commit9233e6f193f68a0477e2900ac7a82928ab7f4adc (patch)
treedc02cd42afc90c3a87d21e453a6bc80848aee5e8 /frontend/src/app/_services
parentf36899620a84cd1629b0d31a930f8bf8eb797d8b (diff)
Ispravljen bag: kad se izmeni dataset, refreshuje se 2. korak na eksperiment strani. Dodata ruta kako bi se eksperiment iz kolekcije otvorio na eksperiment strani. Sredjivanje otvaranja - pocetak
Diffstat (limited to 'frontend/src/app/_services')
-rw-r--r--frontend/src/app/_services/datasets.service.ts3
-rw-r--r--frontend/src/app/_services/experiments.service.ts4
2 files changed, 7 insertions, 0 deletions
diff --git a/frontend/src/app/_services/datasets.service.ts b/frontend/src/app/_services/datasets.service.ts
index 1b961442..11a6ee5e 100644
--- a/frontend/src/app/_services/datasets.service.ts
+++ b/frontend/src/app/_services/datasets.service.ts
@@ -40,6 +40,9 @@ export class DatasetsService {
getDatasetFilePartial(fileId: any, startRow: number, rowNum: number): Observable<any> {
return this.http.get(`${Configuration.settings.apiURL}/file/csvRead/${fileId}/${startRow}/${rowNum}`, { headers: this.authService.authHeader(), responseType: 'text' });
}
+ getDatasetById(datasetId: string): Observable<Dataset> {
+ return this.http.get<Dataset>(`${Configuration.settings.apiURL}/dataset/${datasetId}`, { headers: this.authService.authHeader() });
+ }
editDataset(dataset: Dataset): Observable<Dataset> {
return this.http.put<Dataset>(`${Configuration.settings.apiURL}/dataset/` + dataset._id, dataset, { headers: this.authService.authHeader() });
diff --git a/frontend/src/app/_services/experiments.service.ts b/frontend/src/app/_services/experiments.service.ts
index 29569fca..f4473c8c 100644
--- a/frontend/src/app/_services/experiments.service.ts
+++ b/frontend/src/app/_services/experiments.service.ts
@@ -20,6 +20,10 @@ export class ExperimentsService {
return this.http.get<Experiment[]>(`${Configuration.settings.apiURL}/experiment/getmyexperiments`, { headers: this.authService.authHeader() });
}
+ getExperimentById(id: string): Observable<Experiment> {
+ return this.http.get<Experiment>(`${Configuration.settings.apiURL}/experiment/get/${id}`, { headers: this.authService.authHeader() });
+ }
+
updateExperiment(experiment: Experiment): Observable<Experiment> {
return this.http.put<Experiment>(`${Configuration.settings.apiURL}/experiment/` + experiment._id, experiment, { headers: this.authService.authHeader() });
}