express-idempotency-redis-adapter
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "express-idempotency-redis-adapter", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -12,3 +12,3 @@ import { | ||
const timeToLive = 86_400; | ||
const ttl = 86_400; | ||
@@ -37,9 +37,5 @@ type PartialRedisAdapterOptions = { | ||
constructor({ | ||
connectionConfig, | ||
connectionInstance, | ||
ttl = timeToLive, | ||
}: RedisAdapterOptions) { | ||
this.#client = connectionInstance ?? createClient(connectionConfig); | ||
this.#ttl = ttl; | ||
constructor(options?: RedisAdapterOptions) { | ||
this.#ttl = options?.ttl ?? ttl; | ||
this.#client = options?.connectionInstance ?? createClient(options?.connectionConfig); | ||
} | ||
@@ -46,0 +42,0 @@ |
15128
215