Update language API calls

This commit is contained in:
Rene Vergara 2023-05-08 11:50:11 -05:00
parent 83bc383675
commit 3479c0c206
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -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
}
); );
} }
} }