Commit cd63a6c

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-10-08 16:21:19
fix(kv): use correct env var for enabling Cloudflare KV
1 parent 4c86efd
Changed files (1)
src
database
src/database/kv.py
@@ -15,7 +15,7 @@ async def get_cf_kv(
     api_token: str = DB.CF_API_TOKEN,
     namespace_id: str = DB.CF_KV_NAMESPACE_ID,
     *,
-    enabled: bool = DB.CF_D1_ENABLED,
+    enabled: bool = DB.CF_KV_ENABLED,
     silent: bool = False,
 ) -> dict:
     """Get from Cloudflare KV."""
@@ -48,7 +48,7 @@ async def set_cf_kv(
     api_token: str = DB.CF_API_TOKEN,
     namespace_id: str = DB.CF_KV_NAMESPACE_ID,
     *,
-    enabled: bool = DB.CF_D1_ENABLED,
+    enabled: bool = DB.CF_KV_ENABLED,
     silent: bool = False,
 ) -> bool:
     """Set to Cloudflare KV."""
@@ -74,7 +74,7 @@ async def del_cf_kv(
     api_token: str = DB.CF_API_TOKEN,
     namespace_id: str = DB.CF_KV_NAMESPACE_ID,
     *,
-    enabled: bool = DB.CF_D1_ENABLED,
+    enabled: bool = DB.CF_KV_ENABLED,
     silent: bool = False,
 ):
     """Delete from Cloudflare KV."""