Loading lib/kinetic.js +13 −7 Original line number Diff line number Diff line Loading @@ -1358,20 +1358,26 @@ class GetPreviousResponsePDU extends PDU { * request in a TCP connection * @param {Buffer} keyArg - key for the value that is being returned. * @param {number} dbVersionArg - the version of the object in the DB * @param {Buffer} tagArg - the hash of the value to put. * @param {number} code - response code (SUCCESS, FAIL) * @param {Buffer} errorMessageArg - Detailed error message. * @param {string} algorithm - algorithm used for the tag. * @param {Object} optionsArg - optional : * {string} [options.algorithm] - algorithm used for the * tag * {Buffer} [options.tag] - the hash of the value to put. * @returns {Kinetic} - message structure following the kinetic protocol */ constructor( ackSequence, keyArg, dbVersionArg, tagArg, code, errorMessageArg, algorithm) { ackSequence, keyArg, dbVersionArg, code, errorMessageArg, optionsArg) { super(); const options = optionsArg || {}; let tag = null; if (options.tag) tag = validateVersionArgument(options.tag); const detailedMessage = validateBufferOrStringArgument(errorMessageArg); const key = validateBufferOrStringArgument(keyArg); const tag = validateVersionArgument(tagArg); const dbVersion = validateVersionArgument(dbVersionArg); this.setCommand({ Loading @@ -1384,8 +1390,8 @@ class GetPreviousResponsePDU extends PDU { key, dbVersion, tag, algorithm: validateAlgo(algorithm) || algorithms.SHA1, algorithm: tag ? validateAlgo(options.algorithm) || algorithms.SHA1 : null, }, }, status: { Loading Loading
lib/kinetic.js +13 −7 Original line number Diff line number Diff line Loading @@ -1358,20 +1358,26 @@ class GetPreviousResponsePDU extends PDU { * request in a TCP connection * @param {Buffer} keyArg - key for the value that is being returned. * @param {number} dbVersionArg - the version of the object in the DB * @param {Buffer} tagArg - the hash of the value to put. * @param {number} code - response code (SUCCESS, FAIL) * @param {Buffer} errorMessageArg - Detailed error message. * @param {string} algorithm - algorithm used for the tag. * @param {Object} optionsArg - optional : * {string} [options.algorithm] - algorithm used for the * tag * {Buffer} [options.tag] - the hash of the value to put. * @returns {Kinetic} - message structure following the kinetic protocol */ constructor( ackSequence, keyArg, dbVersionArg, tagArg, code, errorMessageArg, algorithm) { ackSequence, keyArg, dbVersionArg, code, errorMessageArg, optionsArg) { super(); const options = optionsArg || {}; let tag = null; if (options.tag) tag = validateVersionArgument(options.tag); const detailedMessage = validateBufferOrStringArgument(errorMessageArg); const key = validateBufferOrStringArgument(keyArg); const tag = validateVersionArgument(tagArg); const dbVersion = validateVersionArgument(dbVersionArg); this.setCommand({ Loading @@ -1384,8 +1390,8 @@ class GetPreviousResponsePDU extends PDU { key, dbVersion, tag, algorithm: validateAlgo(algorithm) || algorithms.SHA1, algorithm: tag ? validateAlgo(options.algorithm) || algorithms.SHA1 : null, }, }, status: { Loading