Support complex objects

This commit is contained in:
Adria Navarro 2024-03-05 18:10:45 +01:00
parent 82ff748fd9
commit de0527384a
1 changed files with 2 additions and 1 deletions

View File

@ -286,7 +286,8 @@ class RedisWrapper {
const client = this.getClient() const client = this.getClient()
const dataToStore = Object.entries(data).reduce((acc, [key, value]) => { const dataToStore = Object.entries(data).reduce((acc, [key, value]) => {
acc[addDbPrefix(this._db, key)] = value acc[addDbPrefix(this._db, key)] =
typeof value === "object" ? JSON.stringify(value) : value
return acc return acc
}, {} as Record<string, any>) }, {} as Record<string, any>)