Skip to content

Commit

Permalink
Merge pull request #480 from aranaravi/develop
Browse files Browse the repository at this point in the history
Taken the locale from default json file
  • Loading branch information
aranaravi authored Sep 8, 2023
2 parents ad2a3a9 + 4c9c7d9 commit ce0b166
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions resident-ui/src/app/core/services/httpinterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@ export class AuthInterceptor implements HttpInterceptor {
next: HttpHandler
): Observable<HttpEvent<any>> {
request = request.clone({ withCredentials: true });
request = request.clone({
// setHeaders: { 'X-XSRF-TOKEN': this.cookieService.get('XSRF-TOKEN') }
if(localStorage.getItem("langCode")){
request = request.clone({
setHeaders: { 'time-zone-offset': this.localTimeZoneOffset, 'locale': defaultJson['languages'][localStorage.getItem("langCode")]['locale'] }
});
});
}else{
request = request.clone({
setHeaders: { 'time-zone-offset': this.localTimeZoneOffset, 'locale': defaultJson['languages']["eng"]['locale']}
});
}
return next.handle(request).pipe(
tap(
event => {
Expand Down

0 comments on commit ce0b166

Please sign in to comment.