blob: 5a313632a9e3ceccf61cf91e40289ba9ea1785d0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { API_SETTINGS } from 'src/config';
import Dataset from '../_data/Dataset';
import { AuthService } from './auth.service';
@Injectable({
providedIn: 'root'
})
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() });
}
}
|