Having problems with collection.remove on Meteor -


I'm new to web development and meteorite.

I came from a problem. I have put some documents into a collection and now I am trying to remove them, but I can not be successful.

I used to search / insert these lines in the collection, they worked:

  Cases.find (); Case. Inert ({Case_Id: cassid, product_type: product, machine_number: text});  

Now, Im trying to remove a document (we say that Case_Id = 12 is):

  Template.main.events ({'Click .rem_Case_But': function () {remove cases ({Case_Id: 12});}});  

This will not make any changes.

I have also logged in Minimongo and have tried to remove them manually. being successful.

Do you have any ideas?

P.S. I did not use any permission / rejection option at all.

From meteor docs:

Untrusted code can only be assigned to a single document Can be removed at one time, it has been specified by _id.

"Untrusted code" means the code is executed on the client - this is your case you must:

  Var c = cases.findOne ({Case_Id: 12}); If (C) {matters. Delete (C.IID); }  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -