Please help, I am trying to subscribe to data that I have stringified the
JSON but I am getting an error
here is the error: [object Object]
like(post) {
let body = {
postId: post.Id,
userId: firebase.auth().currentUser.uid,
action: post.data().likes && post.data().likes[firebase.auth().
currentUser.uid] == true ? "unlike" : "like"
}
this.http.post(
"https://us-central1-quotes-cc05d.cloudfunctions.net/updateLikesCount", JSON
.stringify(body), {
responseType: 'text'
}).subscribe((data) => {
console.log("here is the data: "+ data)
}, (error) => {
console.log("here is the error: "+ error)
})
}
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.