{"action":"closed","issue":{"url":"https://api.github.com/repos/wprl/baucis/issues/272","labels_url":"https://api.github.com/repos/wprl/baucis/issues/272/labels{/name}","comments_url":"https://api.github.com/repos/wprl/baucis/issues/272/comments","events_url":"https://api.github.com/repos/wprl/baucis/issues/272/events","html_url":"https://github.com/wprl/baucis/issues/272","id":87699614,"number":272,"title":"Registering custom routes on baucis pipeline","user":{"login":"ahmed-negm","id":7012090,"avatar_url":"https://avatars.githubusercontent.com/u/7012090?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmed-negm","html_url":"https://github.com/ahmed-negm","followers_url":"https://api.github.com/users/ahmed-negm/followers","following_url":"https://api.github.com/users/ahmed-negm/following{/other_user}","gists_url":"https://api.github.com/users/ahmed-negm/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmed-negm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmed-negm/subscriptions","organizations_url":"https://api.github.com/users/ahmed-negm/orgs","repos_url":"https://api.github.com/users/ahmed-negm/repos","events_url":"https://api.github.com/users/ahmed-negm/events{/privacy}","received_events_url":"https://api.github.com/users/ahmed-negm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wprl/baucis/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-12T11:26:29Z","updated_at":"2015-06-27T14:09:27Z","closed_at":"2015-06-27T14:09:27Z","body":"Hi,\r\nAs in the wiki, baucis middleware applies to all pre-defined API routes.\r\n\r\nSo, how I could add a new route to the chain?\r\n\r\nFor example: `galleries/{id}` returns an instance of the gallery,\r\nHow I could implement the following route `galleries/{id}/tags` which will do some logic and return a list of tags.\r\n\r\nI could implement it using express api like:\r\n\r\n``` javascript\r\ncontroller.get('/tags', function (request, response, next) {\r\n    // Some logic\r\n    next();\r\n});\r\n```\r\n\r\nBut the problem here is that I should format the response by myself, and I can not utilize the baucis pipeline features like serialization etc.\r\n\r\nSo is there a way to add, register or hook custom routes to the baucis pipeline chain (not express api)?\r\n"}}