meteor / postgres-packages

Early preview of PostgreSQL support for Meteor (deprecated, here for historical reasons)
http://meteor-postgres.readthedocs.org/
158 stars 25 forks source link

Can't update from client #59

Closed renato closed 8 years ago

renato commented 8 years ago

Hello,

Sorry if I'm missing something completely obvious, but I just can't use the Table.update() method from client. I was able to use a Meteor method but I'd like to know which methods are available client-side.

I got the Uncaught Error: Not permitted. Untrusted code may only update documents by ID. [403].

Tried using: Table.update(id, data).run(); and Table.update(data).where({id: id}).run();

Can I use it client-side or should I use a Meteor method instead?

Thanks!

stubailo commented 8 years ago

Only methods are supported in the current code.

renato commented 8 years ago

Thanks for the feedback!

I was using a method but decided to check the Table.update after seeing a A method named '/table/update' is already defined in the console.

stubailo commented 8 years ago

Ah yeah currently there isn't a way to stop meteor from defining that for every collection. I was hoping to remove that at some point but it didn't end up being a top priority.