2013-06-06 07:20:16 +04:00
|
|
|
module.exports = function (C, app) {
|
|
|
|
function route(method, path, action) {
|
|
|
|
app[method.toLowerCase()](path + '.:format?', action);
|
|
|
|
}
|
2013-06-03 22:23:26 +04:00
|
|
|
|
2013-06-12 00:23:38 +04:00
|
|
|
route( 'GET', '/events', C.Events.index );
|
|
|
|
route( 'GET', '/events/:id', C.Events.details );
|
|
|
|
route( 'POST', '/events', C.Events.create );
|
|
|
|
route( 'PATCH', '/events/:id', C.Events.change );
|
|
|
|
//route( 'PUT', '/events/:id', C.Events.update );
|
|
|
|
route( 'DELETE', '/events/:id', C.Events.destroy );
|
2013-06-03 22:23:26 +04:00
|
|
|
};
|