From ebe6c4f4c54f780f647c399d4a68e42754156c5e Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Thu, 25 Aug 2022 17:11:43 +0200 Subject: [PATCH] Return parsed json from redis cache --- src/cache/redis.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cache/redis.js b/src/cache/redis.js index dee6e5f..280d427 100644 --- a/src/cache/redis.js +++ b/src/cache/redis.js @@ -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 -- 2.34.1