Skip to content
Browse files

fixes, load module routing config

  • Loading branch information...
1 parent eb9e1e9 commit b8e5d4cff3c5871416b0faa5c49a34b416029d6d @Shogun147 committed
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/module.js
  2. +1 −1 lib/router.js
View
4 lib/module.js
@@ -28,6 +28,7 @@ Class('Katana.Core.Module', {
var Module = this;
Module.config = Config.load(Module.name);
+ if (!Module.config.routing) { Module.config.routing = {}; }
App.on('run', function(callback) {
Model.load(Module.name, function() {
@@ -79,7 +80,6 @@ Class('Katana.Core.Module', {
}
},
- // Rewrite...
run_uri: function() {
var Module = this;
@@ -89,7 +89,7 @@ Class('Katana.Core.Module', {
uri = uri ? uri.replace('.', '/') : uri;
- var route = Router.route(uri, Module.config, Module.name);
+ var route = Router.route(uri, Module.config.routing, Module.name);
route.arguments = args.concat(route.arguments);
View
2 lib/router.js
@@ -26,7 +26,7 @@ Class('Katana.Core.Router', {
module: module || '',
directory: Config.route.directory || '',
controller: Config.route.controller || (module || 'home'),
- action: Config.route.index || 'index',
+ action: Config.route.action || 'index',
arguments: Config.route.arguments || [],
routed: routed
};

0 comments on commit b8e5d4c

Please sign in to comment.
Something went wrong with that request. Please try again.