Added eslint and fixed an issue from #158

This commit is contained in:
John Crepezzi 2017-06-26 12:19:36 -04:00
parent 3ed1d775ac
commit 5939dec185
6 changed files with 36 additions and 13 deletions

View file

@ -29,7 +29,7 @@ RedisDocumentStore.connect = function(options) {
if (options.password) {
RedisDocumentStore.client.auth(options.password);
}
RedisDocumentStore.client.select(index, function(err, reply) {
RedisDocumentStore.client.select(index, function(err) {
if (err) {
winston.error(
'error connecting to redis index ' + index,
@ -46,7 +46,7 @@ RedisDocumentStore.connect = function(options) {
// Save file in a key
RedisDocumentStore.prototype.set = function(key, data, callback, skipExpire) {
var _this = this;
RedisDocumentStore.client.set(key, data, function(err, reply) {
RedisDocumentStore.client.set(key, data, function(err) {
if (err) {
callback(false);
}
@ -62,7 +62,7 @@ RedisDocumentStore.prototype.set = function(key, data, callback, skipExpire) {
// Expire a key in expire time if set
RedisDocumentStore.prototype.setExpiration = function(key) {
if (this.expire) {
RedisDocumentStore.client.expire(key, this.expire, function(err, reply) {
RedisDocumentStore.client.expire(key, this.expire, function(err) {
if (err) {
winston.error('failed to set expiry on key: ' + key);
}