{"action":"created","issue":{"url":"https://api.github.com/repos/kahmali/meteor-restivus/issues/69","labels_url":"https://api.github.com/repos/kahmali/meteor-restivus/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/kahmali/meteor-restivus/issues/69/comments","events_url":"https://api.github.com/repos/kahmali/meteor-restivus/issues/69/events","html_url":"https://github.com/kahmali/meteor-restivus/issues/69","id":76205604,"number":69,"title":"Pass authentication user to meteor method","user":{"login":"outaTiME","id":140472,"avatar_url":"https://avatars.githubusercontent.com/u/140472?v=3","gravatar_id":"","url":"https://api.github.com/users/outaTiME","html_url":"https://github.com/outaTiME","followers_url":"https://api.github.com/users/outaTiME/followers","following_url":"https://api.github.com/users/outaTiME/following{/other_user}","gists_url":"https://api.github.com/users/outaTiME/gists{/gist_id}","starred_url":"https://api.github.com/users/outaTiME/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outaTiME/subscriptions","organizations_url":"https://api.github.com/users/outaTiME/orgs","repos_url":"https://api.github.com/users/outaTiME/repos","events_url":"https://api.github.com/users/outaTiME/events{/privacy}","received_events_url":"https://api.github.com/users/outaTiME/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-14T02:43:27Z","updated_at":"2015-05-14T02:48:11Z","closed_at":null,"body":"Hi guys, how pass userId to Meteor method this is my scenario:\r\n\r\n```js\r\n\r\nRestivus.addRoute('devices/:id', {authRequired: true}, {\r\n  delete: {\r\n    action: function () {\r\n      var deviceId = this.urlParams.id;\r\n      return Meteor.call('deleteDevice', deviceId);\r\n    }\r\n  }\r\n});\r\n\r\nMeteor.methods({\r\n  deleteDevice: function (deviceId) {\r\n    if (!this.userId) {\r\n      throw new Meteor.Error('not-authenticated', 'User must be logged in to perform this operation')\r\n    }\r\n    check(deviceId, String);\r\n    // pass\r\n  }\r\n});\r\n\r\n```\r\n\r\nthe userId never exist in Meteor method context, how can resolve that without passing userId as method param.\r\n\r\nthks !"},"comment":{"url":"https://api.github.com/repos/kahmali/meteor-restivus/issues/comments/101888807","html_url":"https://github.com/kahmali/meteor-restivus/issues/69#issuecomment-101888807","issue_url":"https://api.github.com/repos/kahmali/meteor-restivus/issues/69","id":101888807,"user":{"login":"outaTiME","id":140472,"avatar_url":"https://avatars.githubusercontent.com/u/140472?v=3","gravatar_id":"","url":"https://api.github.com/users/outaTiME","html_url":"https://github.com/outaTiME","followers_url":"https://api.github.com/users/outaTiME/followers","following_url":"https://api.github.com/users/outaTiME/following{/other_user}","gists_url":"https://api.github.com/users/outaTiME/gists{/gist_id}","starred_url":"https://api.github.com/users/outaTiME/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outaTiME/subscriptions","organizations_url":"https://api.github.com/users/outaTiME/orgs","repos_url":"https://api.github.com/users/outaTiME/repos","events_url":"https://api.github.com/users/outaTiME/events{/privacy}","received_events_url":"https://api.github.com/users/outaTiME/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T02:48:11Z","updated_at":"2015-05-14T02:48:11Z","body":"Note, `deleteDevice` method is shared we use from restivus and meteor app ...\r\n\r\nthks !"}}