radiegtya / meteoris2

a Realtime Javascript Boilerplate base on Meteor Js Framework
MIT License
246 stars 46 forks source link

Adding REST API package #47

Closed paulovale closed 9 years ago

paulovale commented 9 years ago

Hi, I'm trying to add an http crud restpoint for the collections. I'm testing two pakages (xcv58:collection-api and nimble:restivus) with meteroris and I'm obtaining the same error when submitting the HTTP POST: "Error: Meteor.userId can only be invoked in method calls. Use this.userId in publish functions." Can you help me? Thanks

radiegtya commented 9 years ago

Hi @paulovale

I am already using REST service with restivus package for big project in meteoris and I have no problem using it. Your error was because you are using Meteor.userId on server side. That is basic meteor knowledge. Good luck.

paulovale commented 9 years ago

Hi @radiegtya, Thank you for taking the time to answer. Just wanted to add that this only occurs when creating the collection via meteoris crud generator, with no extra code added by me. As a suggestion, maybe in the future you could add the possibility to create rest endpoints to the boilerplate, using the web interface.

radiegtya commented 9 years ago

@paulovale

Thanks for the idea, maybe in the future I'll make it. Ofc When I have time n money :D