aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_services/datasets.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/_services/datasets.service.ts')
-rw-r--r--frontend/src/app/_services/datasets.service.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/src/app/_services/datasets.service.ts b/frontend/src/app/_services/datasets.service.ts
index fadcdeae..35ca24e5 100644
--- a/frontend/src/app/_services/datasets.service.ts
+++ b/frontend/src/app/_services/datasets.service.ts
@@ -13,12 +13,14 @@ export class DatasetsService {
constructor(private http: HttpClient, private authService: AuthService) { }
getPublicDatasets(): Observable<Dataset[]> {
- return this.http.get<Dataset[]>(`${API_SETTINGS.apiURL}/Dataset/publicdatasets`, { headers: this.authService.authHeader() });
+ return this.http.get<Dataset[]>(`${API_SETTINGS.apiURL}/dataset/publicdatasets`, { headers: this.authService.authHeader() });
}
- addDataset(dataset:Dataset):any{
+ addDataset(dataset: Dataset): any {
return this.http.post(`${API_SETTINGS.apiURL}/dataset/add`, dataset, { headers: this.authService.authHeader() });
}
-
+ getDatasetFile(fileId: any): any {
+ return this.http.get(`${API_SETTINGS.apiURL}/file/download?id=${fileId}`, { headers: this.authService.authHeader(), responseType: 'text' });
+ }
}