Commit d90e120c authored by kpandey's avatar kpandey

updated

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174979 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3c615278
......@@ -25,14 +25,16 @@ export class EcmProductReviewService {
}
updateLikes(itemCode, data) {
let userServiceUrl = '/ecm/service/feeds/update/likes/'+itemCode;
let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers });
let siteCode = localStorage.getItem('SITE_CODE');
// let userServiceUrl = '/ecm/service/feeds/L2D01/update/likes/'+itemCode;
let userServiceUrl = '/ecm/service/feeds';
console.log("Inside Update Likes "+itemCode);
console.log(JSON.stringify(data));
this.http.post( this.hostUrlService.hostUrl+userServiceUrl, data, options)
this.http.post( this.hostUrlService.hostUrl+userServiceUrl + '/'+ siteCode + '/update' + '/likes' + '/' + itemCode , data, options)
.subscribe(data => {
console.log("Updated Likes");
}, error => {
......@@ -41,14 +43,16 @@ export class EcmProductReviewService {
}
submitReview(reviewData){
let userServiceUrl = '/ecm/service/feeds/review';
// let userServiceUrl = '/ecm/service/feeds/L2D01/review';
let userServiceUrl = '/ecm/service/feeds';
let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers });
let siteCode = localStorage.getItem('SITE_CODE');
console.log("Submitting Review...");
console.log(JSON.stringify(reviewData));
this.http.post( this.hostUrlService.hostUrl+userServiceUrl, reviewData, options)
this.http.post( this.hostUrlService.hostUrl+userServiceUrl + '/'+ siteCode + '/review' , reviewData, options)
.subscribe(data => {
console.log("Add Review");
}, error => {
......@@ -57,8 +61,10 @@ export class EcmProductReviewService {
}
getUserReview(itemCode){
let getUserReviewUrl = '/ecm/service/feeds/review/';
getUserReviewUrl = getUserReviewUrl + itemCode;
// let getUserReviewUrl = '/ecm/service/feeds/L2D01/review/';
let siteCode = localStorage.getItem('SITE_CODE');
let getUserReviewUrl = '/ecm/service/feeds';
getUserReviewUrl = getUserReviewUrl + '/'+ siteCode + '/review' + '/' + itemCode;
console.log("URL: " +getUserReviewUrl);
let headers = new Headers( { 'Content-Type': 'application/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