Skip to content

Commit

Permalink
Use asCallback in place of nodeify
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesboeufs committed Jul 23, 2016
1 parent 24afb59 commit 8345102
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.js
Expand Up @@ -208,7 +208,7 @@ module.exports = function connectMongo(connect) {
return s;
}
})
.nodeify(callback);
.asCallback(callback);
}

set(sid, session, callback) {
Expand Down Expand Up @@ -253,7 +253,7 @@ module.exports = function connectMongo(connect) {
}
this.emit('set', sid);
})
.nodeify(callback);
.asCallback(callback);
}

touch(sid, session, callback) {
Expand Down Expand Up @@ -292,26 +292,26 @@ module.exports = function connectMongo(connect) {
this.emit('touch', sid);
}
})
.nodeify(callback);
.asCallback(callback);
}

destroy(sid, callback) {
return this.collectionReady()
.then(collection => collection.removeAsync({ _id: this.computeStorageId(sid) }))
.then(() => this.emit('destroy', sid))
.nodeify(callback);
.asCallback(callback);
}

length(callback) {
return this.collectionReady()
.then(collection => collection.countAsync({}))
.nodeify(callback);
.asCallback(callback);
}

clear(callback) {
return this.collectionReady()
.then(collection => collection.dropAsync())
.nodeify(callback);
.asCallback(callback);
}

close() {
Expand Down

0 comments on commit 8345102

Please sign in to comment.