Skip to content

Commit 501679c

Browse files
committed
reverted router multiple routes
1 parent fd7bdaa commit 501679c

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

.cfconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"host": "localhost",
1818
"dbdriver": "MySQL",
1919
"password": "${DB_PASSWORD}",
20-
"dsn": "jdbc:mysql://localhost:3306/coolblog?tinyInt1isBit=false&useSSL=false",
20+
"dsn": "${DB_CONNECTIONSTRING}",
2121
"custom": "",
2222
"username": "${DB_USER:root}",
2323
"database": "coolblog",

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ notifications:
88
env:
99
global:
1010
# TARGET RELEASE VERSION: BUMP AS NEEDED
11-
- COLDBOX_VERSION=5.7.0
11+
- COLDBOX_VERSION=5.6.1
1212
matrix:
1313
- ENGINE=lucee@4.5 ANT_TARGET=build.all
1414
- ENGINE=lucee@5 ANT_TARGET=run-tests

system/web/routing/Router.cfc

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -765,28 +765,29 @@ component accessors="true" extends="coldbox.system.FrameworkSupertype" threadsaf
765765
}
766766

767767
// Check for existing route matches
768-
var matchingRoutes = variables.routes.filter( function( route ) {
769-
return route.pattern == thisRoute.pattern &&
770-
route.domain == thisRoute.domain;
771-
} );
772-
if ( ! matchingRoutes.isEmpty() ) {
773-
var matchingRoute = matchingRoutes[ 1 ];
774-
// collect action:
775-
var actions = {};
776-
var matchingActions = isStruct( matchingRoute.action ) ? matchingRoute.action : {};
777-
structAppend( actions, matchingActions, true );
778-
for ( var verb in matchingRoute.verbs ) {
779-
structInsert( actions, verb, matchingRoute.event );
780-
}
781-
var thisRouteActions = isStruct( thisRoute.action ) ? thisRoute.action : {};
782-
structAppend( actions, thisRouteActions, true );
783-
for ( var verb in thisRoute.verbs ) {
784-
structInsert( actions, verb, thisRoute.event );
785-
}
786-
matchingRoute.action = actions;
787-
matchingRoute.verbs = "";
788-
return this;
789-
}
768+
// var matchingRoutes = variables.routes.filter( function( route ) {
769+
// return route.pattern == thisRoute.pattern &&
770+
// route.domain == thisRoute.domain;
771+
// } );
772+
// if ( ! matchingRoutes.isEmpty() ) {
773+
// writeDump( var=matchingRoutes );abort;
774+
// var matchingRoute = matchingRoutes[ 1 ];
775+
// // collect action:
776+
// var actions = {};
777+
// var matchingActions = isStruct( matchingRoute.action ) ? matchingRoute.action : {};
778+
// structAppend( actions, matchingActions, true );
779+
// for ( var verb in matchingRoute.verbs ) {
780+
// structInsert( actions, verb, matchingRoute.event );
781+
// }
782+
// var thisRouteActions = isStruct( thisRoute.action ) ? thisRoute.action : {};
783+
// structAppend( actions, thisRouteActions, true );
784+
// for ( var verb in thisRoute.verbs ) {
785+
// structInsert( actions, verb, thisRoute.event );
786+
// }
787+
// matchingRoute.action = actions;
788+
// matchingRoute.verbs = "";
789+
// return this;
790+
// }
790791

791792
// Check if we have optional args by looking for a ?
792793
if( findnocase( "?", thisRoute.pattern ) AND NOT findNoCase( "regex:", thisRoute.pattern ) ){

0 commit comments

Comments
 (0)