clkao/pgrest — pull request #44 by poga (2013-11-16 03:56:13+00:00)
Title: fix TypeError when deleting a collection

pgrest will crash with a TypeError when received a DELETE request on a collection

```
% curl -H 'Content-Type: application/json' -X DELETE http://localhost:3000/collections/foo

.../pgrest/node_modules/plv8x/node_modules/tmp/lib/tmp.js:261
throw err;
^
TypeError: number is not a function
at done (.../MyProject/pgrest/lib/routes.js:14:26)
at .../MyProject/pgrest/lib/routes.js:59:18
at null.callback (.../MyProject/pgrest/lib/index.js:52:49)
at NativeQuery.handleReadyForQuery (.../MyProject/pgrest/node_modules/plv8x/node_modules/pg/lib/native/query.js:77:10)
at Connection. (.../MyProject/pgrest/node_modules/plv8x/node_modules/pg/lib/native/index.js:236:33)
at Connection.EventEmitter.emit (events.js:92:17)
```