Commit 639292a9 by zCaesar

allow all

parent 56021c2a
...@@ -10,10 +10,8 @@ module.exports = function (options = {}) { ...@@ -10,10 +10,8 @@ module.exports = function (options = {}) {
} }
function doRedis(client_id) { function doRedis(client_id) {
if (client_id.indexOf('mqttjs') === -1) { require('./redis/on_offline').on_offline_redis(client_id).then(status => {
require('./redis/on_offline').on_offline_redis(client_id).then(status => { console.log('redis:status: ' + status)
console.log('redis:status: ' + status) })
})
}
} }
} }
\ No newline at end of file
...@@ -13,10 +13,10 @@ function on_register_redis(deviceid) { // first time to access on authhook auth_ ...@@ -13,10 +13,10 @@ function on_register_redis(deviceid) { // first time to access on authhook auth_
console.log(information.keys) console.log(information.keys)
redis.hset(information.keys, 'status', information.status, 'register_on', information.register_on, 'last_check', information.last_check, function (err, res) { redis.hset(information.keys, 'status', information.status, 'register_on', information.register_on, 'last_check', information.last_check, function (err, res) {
console.log('res: ',res) console.log('res: ',res)
if (res) { // if (res) {
deviceUsageCount() deviceUsageCount()
resolve(true) // 0 is ok, 1 is no => if ok is 0 then not 0 = 1 resolve(true) // 0 is ok, 1 is no => if ok is 0 then not 0 = 1
} else resolve(false) // } else resolve(false)
}) })
} }
}) })
......
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