diff options
Diffstat (limited to 'ecomp-sdk/epsdk-app-os/ngappsrc/src/app')
-rw-r--r-- | ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts | 9 | ||||
-rw-r--r-- | ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts | 23 |
2 files changed, 20 insertions, 12 deletions
diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts index a86ea759..6dcdda67 100644 --- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts +++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts @@ -36,7 +36,7 @@ * */ import { CommonModule } from '@angular/common'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; @@ -47,6 +47,7 @@ import { SidebarService } from './shared/services/index'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { UserService } from './shared/services/user/user.service'; +import { HeaderInterceptor } from './shared/interceptors/header-interceptor'; @NgModule({ imports: [ @@ -60,7 +61,11 @@ import { UserService } from './shared/services/user/user.service'; ReactiveFormsModule, ], declarations: [AppComponent], - providers: [SidebarService,UserService], + providers: [SidebarService,UserService,{ + provide: HTTP_INTERCEPTORS, + useClass: HeaderInterceptor, + multi: true, + }], bootstrap: [AppComponent] }) export class AppModule {} diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts index 7d14ee39..1c631347 100644 --- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts +++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts @@ -10,56 +10,59 @@ export class ProfileService { constructor(private http:HttpClient) { } getUserPagination(){ - return this.http.get(environment.getUserPagination,{ withCredentials: true }); + return this.http.get(environment.getUserPagination); } + getAllUsers(){ + return this.http.get(environment.getAllUsers); + } getPostSearch(postSearchBean:any) { - return this.http.post(environment.postSearch,JSON.stringify({postSearchBean: postSearchBean}),{ withCredentials: true }); + return this.http.post(environment.postSearch,JSON.stringify({postSearchBean: postSearchBean})); } importUser(postSearchBean:any) { - return this.http.post(environment.importSearch,JSON.stringify({postSearchBean: postSearchBean}),{ withCredentials: true }); + return this.http.post(environment.importSearch,JSON.stringify({postSearchBean: postSearchBean})); } getPostProfile() { - return this.http.get(environment.getPostProfile,{ withCredentials: true }); + return this.http.get(environment.getPostProfile); } getSelfProfile() { - return this.http.get(environment.getSelfProfile,{ withCredentials: true }); + return this.http.get(environment.getSelfProfile); } getProfileById(profileId){ - return this.http.get(environment.getProfileById+"?profile_id="+profileId, {withCredentials: true }); + return this.http.get(environment.getProfileById+"?profile_id="+profileId); } removeRole(data,profileId) { - return this.http.post(environment.removeUserRole+'?profile_id='+profileId,JSON.stringify({role: data}),{ withCredentials: true }); + return this.http.post(environment.removeUserRole+'?profile_id='+profileId,JSON.stringify({role: data})); } addUserRole(data,profileId) { - return this.http.post(environment.addUserRole+'?profile_id='+profileId,JSON.stringify({role: data}),{ withCredentials: true }); + return this.http.post(environment.addUserRole+'?profile_id='+profileId,JSON.stringify({role: data})); } saveProfile(data,profileId) { - return this.http.post(environment.saveProfile+'?profile_id='+profileId,JSON.stringify({profile: data.profile,selectedCountry:data.selectedCountry, selectedState:data.selectedState, selectedTimeZone:data.selectedTimeZone}),{ withCredentials: true }); + return this.http.post(environment.saveProfile+'?profile_id='+profileId,JSON.stringify({profile: data.profile,selectedCountry:data.selectedCountry, selectedState:data.selectedState, selectedTimeZone:data.selectedTimeZone})); } toggleProfileActive(profileId){ - return this.http.get(environment.toggleProfileActive+profileId,{ withCredentials: true }); + return this.http.get(environment.toggleProfileActive+profileId); } |