Commit 2361e0ee authored by pborate's avatar pborate

Updated ecm-order.service.ts


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@176791 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fa66811e
......@@ -13,7 +13,7 @@ import { HostUrlService } from '../host-url.service';
@Injectable()
export class EcmOrderService {
private orderActionUrl = '/ecm/service/orders';
private orderActionUrl = '/ecm/service/';
orderItems: Order[];
......@@ -23,8 +23,8 @@ export class EcmOrderService {
console.log( "fetch Orders Called" );
let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers });
return this.http.get( this.hostUrlService.hostUrl+this.orderActionUrl, options )
let siteCode = localStorage.getItem('SITE_CODE');
return this.http.get( this.hostUrlService.hostUrl+this.orderActionUrl+siteCode+"/orders/", options )
.map( (res) => this.extractData(res) )
.catch(this.handleError);
}
......@@ -34,8 +34,8 @@ export class EcmOrderService {
console.log(JSON.stringify(order));
let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers });
return this.http.post( this.hostUrlService.hostUrl+this.orderActionUrl, JSON.stringify(order) , options)
let siteCode = localStorage.getItem('SITE_CODE');
return this.http.post( this.hostUrlService.hostUrl+this.orderActionUrl+siteCode+"/orders/", JSON.stringify(order) , options)
.map( (res) => this.extractData(res) );
}
......@@ -44,8 +44,8 @@ export class EcmOrderService {
console.log(JSON.stringify(order));
let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers });
return this.http.post( this.hostUrlService.hostUrl+this.orderActionUrl, JSON.stringify(order) , options)
let siteCode = localStorage.getItem('SITE_CODE');
return this.http.post( this.hostUrlService.hostUrl+this.orderActionUrl+siteCode+"/orders/", JSON.stringify(order) , options)
.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