appolo-express
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -21,2 +21,5 @@ "use strict"; | ||
var abstract = _.first(_.remove(config.routes, function(route){ return route.abstract })); | ||
_.forEach(config.routes,function(route){ | ||
@@ -27,2 +30,6 @@ if(!route.controller){ | ||
if(abstract){ | ||
_.defaults(route,abstract); | ||
} | ||
this._routes.push(route) | ||
@@ -29,0 +36,0 @@ |
@@ -28,3 +28,3 @@ { | ||
"main": "./index.js", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"license": "Mit", | ||
@@ -31,0 +31,0 @@ "repository": { |
@@ -31,3 +31,3 @@ var should = require('chai').should(), | ||
chai.request('http://localhost:8183') | ||
.get('/test/route/') | ||
.get('/test/route/?username=11') | ||
.res(function (res) { | ||
@@ -34,0 +34,0 @@ res.should.to.have.status(200); |
var Controller = require('../../../lib/controller/controller'); | ||
var validator = require('joi'); | ||
module.exports = Controller.define({ | ||
@@ -7,2 +8,8 @@ $config: { | ||
{ | ||
abstract:true, | ||
validations:{ | ||
username:validator.string().required() | ||
} | ||
}, | ||
{ | ||
path: '/test/route/', | ||
@@ -9,0 +16,0 @@ method: 'get', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41147
525