You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Injectable}from'@angular/core';import{HttpRequest,HttpResponse,HttpHandler,HttpEvent,HttpInterceptor,}from'@angular/common/http';import{Observable}from'rxjs/Observable';declarefunctionrequire(name: string): any;
@Injectable()exportclassCamelCaseInterceptorimplementsHttpInterceptor{intercept(request: HttpRequest<any>,next: HttpHandler): Observable<HttpEvent<any>>{constcamelcaseKeys=require('camelcase-keys');returnnext.handle(request).map((event: HttpEvent<any>)=>{if(eventinstanceofHttpResponse&&(event.headers.get('content-type')||'').indexOf('application/json')>-1&&event.body.constructor!==Array){// TODO: Temporarily leaving in both snakecase and adding camelcase keys until all of app is updatedreturnevent.clone({body: Object.assign({},event.body,camelcaseKeys(event.body,{deep: true,exclude: ['_permissions']}),),});}returnevent;});}}
The text was updated successfully, but these errors were encountered:
Core currently has:
The text was updated successfully, but these errors were encountered: