Return parsed json from redis cache

This commit is contained in:
2022-08-25 17:11:43 +02:00
parent 628ed52012
commit ebe6c4f4c5

2
src/cache/redis.js vendored
View File

@@ -23,7 +23,7 @@ try {
get(key, callback) {
console.log(`redis-dummy get: ${key}`); // eslint-disable-line no-console
const hit = mockCache[key];
return Promise.resolve().then(callback(null, hit));
return Promise.resolve().then(callback(null, JSON.parse(hit)));
},
set(key, json, callback) {
console.log(`redis-dummy set: ${key}`); // eslint-disable-line no-console