Commit ab74595e authored by kpandey's avatar kpandey

updated

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174992 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 350ce21b
...@@ -13,8 +13,10 @@ import { HostUrlService } from '../host-url.service'; ...@@ -13,8 +13,10 @@ import { HostUrlService } from '../host-url.service';
@Injectable() @Injectable()
export class ProfileInfoService { export class ProfileInfoService {
private userActionUrl = '/ecm/service/feeds/profile'; // private userActionUrl = '/ecm/service/feeds/L2D01/profile';
private userActionUrl = '/ecm/service/feeds';
profile: Profile; profile: Profile;
constructor(public hostUrlService : HostUrlService,private http: Http, private store: Store<AppState>, private profileActions: ProfileActions) { } constructor(public hostUrlService : HostUrlService,private http: Http, private store: Store<AppState>, private profileActions: ProfileActions) { }
...@@ -24,8 +26,9 @@ export class ProfileInfoService { ...@@ -24,8 +26,9 @@ export class ProfileInfoService {
console.log( "fetchUserInfo Called" ); console.log( "fetchUserInfo Called" );
let headers = new Headers( { 'Content-Type': 'application/json' }); let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers }); let options = new RequestOptions( { headers: headers });
let siteCode = localStorage.getItem('SITE_CODE');
return this.http.get(this.hostUrlService.hostUrl+this.userActionUrl, options) return this.http.get(this.hostUrlService.hostUrl+this.userActionUrl + '/' + siteCode + '/profile', options)
.map( (res) => this.extractData(res) ) .map( (res) => this.extractData(res) )
.catch(this.handleError); .catch(this.handleError);
} }
...@@ -35,8 +38,9 @@ export class ProfileInfoService { ...@@ -35,8 +38,9 @@ export class ProfileInfoService {
console.log(JSON.stringify(userData)); console.log(JSON.stringify(userData));
let headers = new Headers( { 'Content-Type': 'application/json' }); let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers }); let options = new RequestOptions( { headers: headers });
let siteCode = localStorage.getItem('SITE_CODE');
return this.http.post( this.hostUrlService.hostUrl+this.userActionUrl, JSON.stringify(userData) , options) return this.http.post( this.hostUrlService.hostUrl+this.userActionUrl + '/' + siteCode + '/profile' , JSON.stringify(userData) , options)
.map( (res) => this.extractData(res) ); .map( (res) => this.extractData(res) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment