parseInt redis values

This commit is contained in:
Klemek
2021-03-30 20:19:37 +02:00
parent f7167a85a8
commit 823d97f4bb
+2 -2
View File
@@ -49,8 +49,8 @@ module.exports = (config, onConnect, onError) => {
} else { } else {
client.hgetall(path, (_, value) => { client.hgetall(path, (_, value) => {
cb({ cb({
hits: value ? value.h || 0 : 0, hits: value ? parseInt(value.h) || 0 : 0,
total_visitors: value ? value.v || 0 : 0, total_visitors: value ? parseInt(value.v) || 0 : 0,
current_visitors: cleanVisitors(path), current_visitors: cleanVisitors(path),
}); });
}); });