Skip to content

Commit

Permalink
Remove app.del
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Nov 7, 2014
1 parent 509ebb1 commit f31dcff
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 26 deletions.
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
===

* remove:
- `app.del` - use `app.delete`
- `res.json(obj, status)` signature - use `res.json(status, obj)`
- `res.jsonp(obj, status)` signature - use `res.jsonp(status, obj)`
- `res.send(body, status)` signature - use `res.send(status, body)`
Expand Down
5 changes: 0 additions & 5 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ var http = require('http');
var compileETag = require('./utils').compileETag;
var compileQueryParser = require('./utils').compileQueryParser;
var compileTrust = require('./utils').compileTrust;
var deprecate = require('depd')('express');
var merge = require('utils-merge');
var resolve = require('path').resolve;
var slice = Array.prototype.slice;
Expand Down Expand Up @@ -444,10 +443,6 @@ app.all = function(path){
return this;
};

// del -> delete alias

app.del = deprecate.function(app.delete, 'app.del: Use app.delete instead');

/**
* Render the given view `name` name with `options`
* and a callback accepting an error and the
Expand Down
17 changes: 0 additions & 17 deletions test/app.del.js

This file was deleted.

4 changes: 2 additions & 2 deletions test/app.listen.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ describe('app.listen()', function(){
it('should wrap with an HTTP server', function(done){
var app = express();

app.del('/tobi', function(req, res){
res.end('deleted tobi!');
app.get('/tobi', function(req, res){
res.end('got tobi!');
});

var server = app.listen(9999, function(){
Expand Down
2 changes: 1 addition & 1 deletion test/app.options.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('OPTIONS', function(){
it('should default to the routes defined', function(done){
var app = express();

app.del('/', function(){});
app.post('/', function(){});
app.get('/users', function(req, res){});
app.put('/users', function(req, res){});

Expand Down
2 changes: 1 addition & 1 deletion test/app.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('app.router', function(){
})

describe('methods', function(){
methods.concat('del').forEach(function(method){
methods.forEach(function(method){
if (method === 'connect') return;

it('should include ' + method.toUpperCase(), function(done){
Expand Down

0 comments on commit f31dcff

Please sign in to comment.