Skip to content

Commit

Permalink
Use db.destroy over PouchDB.destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
daleharvey committed Jan 24, 2015
1 parent 0b31cad commit d1c8f78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/routes/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function(app, PouchDB) {
// Delete a database
app.delete('/:db', function (req, res, next) {
var name = encodeURIComponent(req.params.db);
PouchDB.destroy(name, function (err, info) {
new PouchDB(name).destroy(function (err, info) {
if (err) return res.status(500).send(err);
res.status(200).send({ok: true });
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pouchdb-express-router",
"version": "0.0.2",
"version": "0.0.3",
"description": "Provide minimal routing and functionality to provide a PouchDB server that replicates",
"main": "index.js",
"dependencies": {
Expand Down

0 comments on commit d1c8f78

Please sign in to comment.