I have a simple mail route that searches for a message _id. The problem is that the assistant pathForcreates this way:
ObjectID("52e16453431fc2fba4b6d6a8")
I assume that the mongoDB insert has been changed, and now the object _idcontains another object inside it called _str.
Here is my route:
this.route("post", {
path: "/post/:_id",
waitOn:function(){
NProgress.start();
Meteor.subscribe("Teams");
},
before: function () {
NProgress.done();
},
data: function () {
return Posts.findOne({_id: this.params._id});
}
});
He is currently creating hrefas:
post/ObjectID("52e16453431fc2fba4b6d6a8")
clicking on it opens the url
post/ObjectID("52e16453431fc2fba4b6d6a8")
However, I get a "NotFound" template instead of a message.
How can i fix this?
source
share