Skip to content
Myr

deprecate app.del

Before adoption: this commit came in with the history the project adopted, so no landing records it.

closes #2095

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 8dc4ff2 · Browse files · 5 files+9 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+9 added−7 removed

  • other:+9 added−7 removed

5 files+9 added−7 removed

modified:examples/resource/app.js+1 added-1 removed
modified:examples/route-map/index.js+4 added-4 removed
modified:examples/route-middleware/index.js+1 added-1 removed
75 unmodified lines
76app.get('/user/:id/edit', loadUser, andRestrictToSelf, function(req, res){77 res.send('Editing user ' + req.user.name);78});7980app.del('/user/:id', loadUser, andRestrictTo('admin'), function(req, res){80app.delete('/user/:id', loadUser, andRestrictTo('admin'), function(req, res){81 res.send('Deleted user ' + req.user.name);82});8384app.listen(3000);
1 unmodified line
modified:lib/application.js+2 added-1 removed
8 unmodified lines
9 , debug = require('debug')('express:application')10 , locals = require('./utils').locals11 , View = require('./view')12 , utils = connect.utils13 , deprecate = require('./utils').deprecate14 , http = require('http');1516/**17 * Application prototype.
411 unmodified lines
429};430431// del -> delete alias432432app.del = app.delete;433app.del = deprecate(app.delete, 'app.del: Use app.delete instead');434435/**436 * Render the given view `name` name with `options`437 * and a callback accepting an error and the
93 unmodified lines
modified:History.md+1 added
13.x2===34 * deprecate `app.del()` -- use `app.delete()` instead5 * update connect to 2.15.06 * Add `res.appendHeader`7 * Call error stack even when response has been sent8 * Patch `res.headerSent` to return Boolean
1298 unmodified lines