Commit d7112e7b by zCaesar

add log

parent 8b17b90d
......@@ -10,7 +10,7 @@ function on_offline_redis(deviceid) { // first time to access on authhook auth_o
else {
var information = setValue(deviceid)
redis.hset(information.keys, 'status', information.status, 'offline_on', information.offline_on, function (err, res) {
console.log(res)
console.log('res:', res)
if (res) {
deviceUsageCount()
resolve(!res) // 0 is ok, 1 is no => if ok is 0 then not 0 = 1
......
......@@ -12,7 +12,7 @@ function on_register_redis(deviceid) { // first time to access on authhook auth_
redis.hdel(information.keys, 'offline_on')
console.log(information.keys)
redis.hset(information.keys, 'status', information.status, 'register_on', information.register_on, 'last_check', information.last_check, function (err, res) {
console.log(res)
console.log('res: ',res)
if (!res) {
deviceUsageCount()
resolve(!res) // 0 is ok, 1 is no => if ok is 0 then not 0 = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment