diff --git a/lib/client.js b/lib/client.js index 9f07f4e..14432f4 100644 --- a/lib/client.js +++ b/lib/client.js @@ -23,7 +23,7 @@ return this.api.queuesCreate(queue_name, { queue: options }, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -31,7 +31,7 @@ return this.api.queuesUpdate(queue_name, { queue: options }, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -49,7 +49,7 @@ Client.prototype.clear = function(cb) { return this.api.queuesClear(this.api.options.queue_name, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -57,7 +57,7 @@ return this.api.queuesUpdate(this.api.options.queue_name, { queue: options }, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -68,7 +68,7 @@ return this.api.queuesAddSubscribers(this.api.options.queue_name, { subscribers: subscribers }, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -79,7 +79,7 @@ return this.api.queuesRemoveSubscribers(this.api.options.queue_name, { subscribers: subscribers }, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -90,13 +90,13 @@ return this.api.queuesReplaceSubscribers(this.api.options.queue_name, { subscribers: subscribers }, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; Client.prototype.del_queue = function(cb) { return this.api.queuesDelete(this.api.options.queue_name, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -176,7 +176,7 @@ Client.prototype.del = function(message_id, options, cb) { return this.api.messagesDelete(this.api.options.queue_name, message_id, options, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -184,7 +184,7 @@ var ids; ids = prepareIdsToRemove(options); return this.api.messagesMultipleDelete(this.api.options.queue_name, ids, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); }; @@ -202,7 +202,7 @@ Client.prototype.msg_release = function(message_id, reservation_id, options, cb) { return this.api.messageRelease(this.api.options.queue_name, message_id, reservation_id, options, function(error, body) { - return typeof cb === "function" ? cb(cb(error, body)) : void 0; + return typeof cb === "function" ? cb(error, body) : void 0; }); };