Update language API calls
This commit is contained in:
parent
83bc383675
commit
3479c0c206
1 changed files with 7 additions and 1 deletions
|
@ -22,7 +22,10 @@ export class LanguageService {
|
||||||
|
|
||||||
public zgoLanguage: string = '';
|
public zgoLanguage: string = '';
|
||||||
|
|
||||||
|
private session: string|null = '';
|
||||||
|
|
||||||
constructor(private http:HttpClient) {
|
constructor(private http:HttpClient) {
|
||||||
|
this.session = localStorage.getItem('s4z_token');
|
||||||
}
|
}
|
||||||
|
|
||||||
getViewElements ( viewName:string ) {
|
getViewElements ( viewName:string ) {
|
||||||
|
@ -45,10 +48,13 @@ export class LanguageService {
|
||||||
//
|
//
|
||||||
// Get component's text data from language database
|
// Get component's text data from language database
|
||||||
//
|
//
|
||||||
|
const params = new HttpParams().append('session', this.session!);
|
||||||
return this.http.get<LanguageData>(this.baseURL +
|
return this.http.get<LanguageData>(this.baseURL +
|
||||||
'/?lang=' + this.zgoLanguage +
|
'/?lang=' + this.zgoLanguage +
|
||||||
'&component=' + viewName
|
'&component=' + viewName
|
||||||
,{ headers : reqHeaders }
|
,{ headers : reqHeaders
|
||||||
|
, params: params
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue