mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 15:09:47 +00:00
fix redis import to be explicit
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import Keyv from 'keyv'
|
||||
import KeyvRedis from '@keyv/redis'
|
||||
|
||||
import { isRedisEnabled, redisUrl, redisNamespace } from './config'
|
||||
|
||||
let db: Keyv
|
||||
if (isRedisEnabled) {
|
||||
db = new Keyv(redisUrl, { namespace: redisNamespace || undefined })
|
||||
const keyvRedis = new KeyvRedis(redisUrl)
|
||||
db = new Keyv({ store: keyvRedis, namespace: redisNamespace || undefined })
|
||||
} else {
|
||||
db = new Keyv()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user