Chapter 7 - postInsert error
adrianmallett opened this issue · 2 comments
adrianmallett commented
When trying to submit a new post, I'm getting a 'postInsert method not found' error and the post fails to submit. I've checked my code and it seems identical to that in your book.
Any ideas?
Adrian
lijuanfan commented
Hi,
Do you know the answer? I met the same question.
lijuanfan commented
lib/collections/posts.js
change the code like this:
delete this line---- check(Meteor.userId(), String);
add this line ---- check(this.userId, String);