|
|
@ -431,20 +431,23 @@ function getSHA256ofJSON(input){ |
|
|
|
return require("crypto").createHash("sha256").update(JSON.stringify(input)).digest("hex"); |
|
|
|
} |
|
|
|
|
|
|
|
var getkey = function getkey(key) { |
|
|
|
return new Promise((resolve) => { |
|
|
|
//var getkey = function getkey(key) {
|
|
|
|
async function getkey(key) { |
|
|
|
//return new Promise((resolve) => {
|
|
|
|
|
|
|
|
pubClient.get(key, function (err, reply) { |
|
|
|
await pubClient.get(key, function (err, reply) { |
|
|
|
if(err){ |
|
|
|
console.log('----------not fount------------') |
|
|
|
resolve(null) |
|
|
|
//resolve(null)
|
|
|
|
return null |
|
|
|
} |
|
|
|
else { |
|
|
|
console.log('---------fount----------') |
|
|
|
resolve(reply) |
|
|
|
//resolve(reply)
|
|
|
|
return reply |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
//})
|
|
|
|
} |
|
|
|
|
|
|
|
var setkey = function setkv(key,value){ |
|
|
|