[Library | Trunk]: ISVocabularies.service.ts: Make url to vocabularies sdg.json and fos.json absolute with domain prefix.

This commit is contained in:
Konstantina Galouni 2022-03-29 17:14:00 +03:00
parent 8002bce6f5
commit 5b732fea7b
1 changed files with 2 additions and 2 deletions

View File

@ -125,14 +125,14 @@ export class ISVocabulariesService {
getLocalVocabularyFromService(vocabularyName: string, properties: EnvProperties): Observable<AutoCompleteValue[]> {
if(vocabularyName == "sdg"){
let url = "/assets/vocabulary/sdg.json";
let url = properties.domain+"/assets/vocabulary/sdg.json";
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
//.map(res => <any> res.json())
.pipe(map(res => res['sdg']))
.pipe(map(res => this.parseSDGs(res)))
.pipe(catchError(this.handleError));
}else if( vocabularyName == "fos"){
let url = "/assets/vocabulary/fos.json";
let url = properties.domain+"/assets/vocabulary/fos.json";
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
//.map(res => <any> res.json())
.pipe(map(res => res['fos']))