fix: redis hget

'node_redis: The HGET command contains a invalid argument type.\n' +
'Only strings, dates and buffers are accepted. Please update your code to use valid argument types.'
This commit is contained in:
Barış Soner Uşaklı
2020-10-15 22:25:56 -04:00
parent e98285dbbb
commit b2ff1594b8
2 changed files with 6 additions and 1 deletions

View File

@@ -75,7 +75,7 @@ module.exports = function (module) {
if (cachedData[key]) {
return cachedData[key].hasOwnProperty(field) ? cachedData[key][field] : null;
}
return await module.client.async.hget(key, field);
return await module.client.async.hget(key, String(field));
};
module.getObjectFields = async function (key, fields) {