|
|
@ -74,12 +74,11 @@ Database.prototype.runCommand = function (opts, cb) { |
|
|
|
opts[tmp] = 1 |
|
|
|
} |
|
|
|
|
|
|
|
var self = this |
|
|
|
this._getConnection(function (err, server) { |
|
|
|
this._getConnection(function (err, connection) { |
|
|
|
if (err) return cb(err) |
|
|
|
server.command(self._dbname + '.$cmd', opts, function (err, result) { |
|
|
|
connection.command(opts, function (err, result) { |
|
|
|
if (err) return cb(err) |
|
|
|
cb(null, result.result) |
|
|
|
cb(null, result) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|