Commit 2edc01cf authored by prumde's avatar prumde

Updated ecm-user-address.service.ts


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174527 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 51c3cc5d
......@@ -8,6 +8,7 @@ import { Store } from '@ngrx/store';
import {AppState} from '../ecm-store/reducers';
import { AdressAction} from '../ecm-store/actions';
import { Address } from './address-manager/address.model';
import { HostUrlService } from '../host-url.service';
@Injectable()
......@@ -16,14 +17,14 @@ export class UserAddressService {
private userActionUrl = '/ecm/service/feeds';
public userAddress;
constructor(private http: Http, private store: Store<AppState>, private addressActions: AdressAction) { }
constructor(private http: Http, private store: Store<AppState>, private addressActions: AdressAction, public hostUrlService : HostUrlService) { }
fetchUserAddress(): Observable<Address[]> {
console.log( "fetchUserAddress Called" );
let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers });
return this.http.get( this.userActionUrl + "/addresses", options )
return this.http.get( this.hostUrlService.hostUrl+this.userActionUrl + "/addresses", options )
.map( (res) => this.extractData(res) )
.catch(this.handleError);
}
......@@ -52,7 +53,7 @@ export class UserAddressService {
deleteUserAddress( userAdress ) {
console.log( "deleteCartItem Called" );
return this.http.delete( this.userActionUrl + '/address/' + userAdress.lineNo, {})
return this.http.delete(this.hostUrlService.hostUrl+ this.userActionUrl + '/address/' + userAdress.lineNo, {})
.map(res => res.json());
}
......
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