We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f390403 commit 8c97da1Copy full SHA for 8c97da1
index.ts
@@ -12,7 +12,7 @@ interface NormalizedRedisClient {
12
}
13
14
interface Serializer {
15
- parse(s: string): SessionData
+ parse(s: string): SessionData | Promise<SessionData>
16
stringify(s: SessionData): string
17
18
@@ -83,7 +83,7 @@ class RedisStore extends Store {
83
try {
84
let data = await this.client.get(key)
85
if (!data) return cb()
86
- return cb(null, this.serializer.parse(data))
+ return cb(null, await this.serializer.parse(data))
87
} catch (err) {
88
return cb(err)
89
0 commit comments