- add relative api url

- npm updates
This commit is contained in:
Arno Kaimbacher 2022-11-18 12:07:54 +01:00
parent 2f690f5bf2
commit 20720fad0c
2 changed files with 758 additions and 896 deletions

1645
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -150,7 +150,8 @@ class DatasetService {
public getYears(): Observable<string[]> { public getYears(): Observable<string[]> {
// const heroes = of(HEROES); // const heroes = of(HEROES);
const host = "https:" + VUE_APP_PORTAL; // const host = "https:" + VUE_APP_PORTAL;
const host = VUE_APP_PORTAL;
const path = "/api/years"; const path = "/api/years";
const base = host + path; const base = host + path;
@ -160,7 +161,8 @@ class DatasetService {
} }
public getDocuments(year: string): Observable<Array<DbDataset>> { public getDocuments(year: string): Observable<Array<DbDataset>> {
const host = "https:" + VUE_APP_PORTAL; // const host = "https:" + VUE_APP_PORTAL;
const host = VUE_APP_PORTAL;
const path = "/api/sitelinks/" + year; const path = "/api/sitelinks/" + year;
const base = host + path; const base = host + path;
@ -170,7 +172,8 @@ class DatasetService {
} }
public getDataset(id: number): Observable<DbDataset> { public getDataset(id: number): Observable<DbDataset> {
const host = "https:" + VUE_APP_PORTAL; // const host = "https:" + VUE_APP_PORTAL;
const host = VUE_APP_PORTAL;
const path = "/api/dataset/" + id; const path = "/api/dataset/" + id;
const apiUrl = host + path; const apiUrl = host + path;
const dataset = api.get<DbDataset>(apiUrl).pipe(map((res) => this.prepareDataset(res))); const dataset = api.get<DbDataset>(apiUrl).pipe(map((res) => this.prepareDataset(res)));