{"action":"created","issue":{"url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/244","repository_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose","labels_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/244/comments","events_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/244/events","html_url":"https://github.com/florianholzapfel/express-restify-mongoose/issues/244","id":132258766,"number":244,"title":"Is there a way to manually perform a PATCH from within some middleware?","user":{"login":"Quixomatic","id":2008821,"avatar_url":"https://avatars.githubusercontent.com/u/2008821?v=3","gravatar_id":"","url":"https://api.github.com/users/Quixomatic","html_url":"https://github.com/Quixomatic","followers_url":"https://api.github.com/users/Quixomatic/followers","following_url":"https://api.github.com/users/Quixomatic/following{/other_user}","gists_url":"https://api.github.com/users/Quixomatic/gists{/gist_id}","starred_url":"https://api.github.com/users/Quixomatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quixomatic/subscriptions","organizations_url":"https://api.github.com/users/Quixomatic/orgs","repos_url":"https://api.github.com/users/Quixomatic/repos","events_url":"https://api.github.com/users/Quixomatic/events{/privacy}","received_events_url":"https://api.github.com/users/Quixomatic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-08T21:16:36Z","updated_at":"2016-02-09T13:45:18Z","closed_at":null,"body":"I would like to write some middleware, probably preCreate or postCreate, that will update some data in another collection. Is there anything I can do to access and perform a PATCH on a specific document from within middleware?"},"comment":{"url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/comments/181869470","html_url":"https://github.com/florianholzapfel/express-restify-mongoose/issues/244#issuecomment-181869470","issue_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/244","id":181869470,"user":{"login":"Zertz","id":2636763,"avatar_url":"https://avatars.githubusercontent.com/u/2636763?v=3","gravatar_id":"","url":"https://api.github.com/users/Zertz","html_url":"https://github.com/Zertz","followers_url":"https://api.github.com/users/Zertz/followers","following_url":"https://api.github.com/users/Zertz/following{/other_user}","gists_url":"https://api.github.com/users/Zertz/gists{/gist_id}","starred_url":"https://api.github.com/users/Zertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zertz/subscriptions","organizations_url":"https://api.github.com/users/Zertz/orgs","repos_url":"https://api.github.com/users/Zertz/repos","events_url":"https://api.github.com/users/Zertz/events{/privacy}","received_events_url":"https://api.github.com/users/Zertz/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T13:45:18Z","updated_at":"2016-02-09T13:45:18Z","body":"Good!\r\n\r\nThere is a generic [example](https://florianholzapfel.github.io/express-restify-mongoose/#precreate), perhaps we could improve the code in `examples/` and move it to the docs to have a complete example or even  create a Yeoman generator."}}