diff --git a/lib/controller.js b/lib/controller.js index f2bf334..16e2be5 100644 --- a/lib/controller.js +++ b/lib/controller.js @@ -5,6 +5,7 @@ var router = require('actionrouter') , mime = require('express').static.mime , utils = require('./utils') , flatten = require('utils-flatten') + , deprecate = require('depd')('maglev') , dispatch = require('./middleware/dispatch') , ControllerError = require('./errors/controllererror'); @@ -46,9 +47,9 @@ function Controller() { * @api public */ Controller.prototype.param = -Controller.prototype.params = function () { +Controller.prototype.params = deprecate.function(function () { return this.__req.param.apply(this.__req, arguments); -}; +}, 'this.param(s) should be replaced by direct access to req.params.property, req.query.property, or req.body.property'); /** * Render response. diff --git a/package.json b/package.json index 3fc3b63..7ad8ad4 100644 --- a/package.json +++ b/package.json @@ -25,30 +25,26 @@ "bugs": { "url": "http://github.com/viadeo/maglev/issues" }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/MIT" - } - ], + "license": "MIT", "bin": { "maglev": "./bin/maglev.js" }, "main": "./lib", "dependencies": { - "pkginfo": "0.3.0", - "commander": "2.7.1", - "co-prompt": "1.0.0", - "express": "4.12.3", "actionrouter": "0.1.0", "bootable": "0.2.4", "bootable-environment": "0.2.0", - "parent-require": "1.0.0", + "co-prompt": "1.0.0", + "commander": "2.7.1", + "debug": "2.1.3", + "depd": "^1.0.1", + "express": "4.12.3", "mkdirp": "0.3.5", + "parent-require": "1.0.0", + "pkginfo": "0.3.0", "scripts": "0.1.0", - "utils-flatten": "1.0.0", "syntax-error": "1.1.2", - "debug": "2.1.3" + "utils-flatten": "1.0.0" }, "devDependencies": { "chai": "2.x.x",