Toedi
Toedi
BABetter Auth
Created by Medim on 3/12/2025 in #help
TypeError: list.filter is not a function.
here is my implementation i think the error is just that you need to remove the JSON.stringify from the get function:
secondaryStorage: {
get: async (key) => {
const value = await redis.get(key);
return value ? value : null;
},
set: async (key, value, ttl) => {
if (ttl) {
await redis.set(key, value, "EX", ttl);
} else {
await redis.set(key, value);
}
},
delete: async (key) => {
await redis.del(key);
},
},
secondaryStorage: {
get: async (key) => {
const value = await redis.get(key);
return value ? value : null;
},
set: async (key, value, ttl) => {
if (ttl) {
await redis.set(key, value, "EX", ttl);
} else {
await redis.set(key, value);
}
},
delete: async (key) => {
await redis.del(key);
},
},
i am using ioredis btw but even if you do not that should fix it atleast i am not getting the error anymore
7 replies
BABetter Auth
Created by Medim on 3/12/2025 in #help
TypeError: list.filter is not a function.
But maybe I am also stupid and there really is something wrong I don't exactly remember what the error was yesterday
7 replies
BABetter Auth
Created by Medim on 3/12/2025 in #help
TypeError: list.filter is not a function.
I did also encounter that error yesterday but managed to fix it I am not home currently but let me check when I am back what my solution was
7 replies