diff --git a/.env b/.env new file mode 100644 index 0000000..50326d8 --- /dev/null +++ b/.env @@ -0,0 +1,6 @@ +DATON_LOGGING_LEVEL=6 +APP_NAME="My First Daton App!" + +DB_USERNAME=garrettmills +DB_PASSWORD=garrettmills +DB_DATABASE=garrettmills diff --git a/lib/src/http/ApiController.ts b/lib/src/http/ApiController.ts index 2642316..5419ff9 100644 --- a/lib/src/http/ApiController.ts +++ b/lib/src/http/ApiController.ts @@ -26,8 +26,6 @@ export default class ApiController extends Controller { return result } - console.log('result', result) - // Otherwise, try to package the results as an API response if ( Array.isArray(result) ) { return this.make(JSONResponseFactory, api.many(result)) diff --git a/lib/src/http/routing/ComplexRoute.ts b/lib/src/http/routing/ComplexRoute.ts index 143771f..d1bbb95 100644 --- a/lib/src/http/routing/ComplexRoute.ts +++ b/lib/src/http/routing/ComplexRoute.ts @@ -10,6 +10,8 @@ export class ComplexRoute extends Route { if ( base_parts.length !== incoming_parts.length ) return false return base_parts.every((base, idx) => { + if ( base.startsWith(':') && base.length > 1 ) return true + else if ( base === '*' ) return true return base.toLowerCase() === incoming_parts[idx].toLowerCase() }) }