Skip to content

Commit 29ec6ef

Browse files
committed
Rename SUBSCRIBERS to NEWSLETTER_SUBSCRIBERS in KV namespace and type definitions
1 parent 8577d8e commit 29ec6ef

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/_stage/actors/repo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export const createRepoActors = <C8 extends DocsConduit>() => {
1313
return c8;
1414
}
1515

16-
const existing = await c8.body.env.SUBSCRIBERS.get(key);
16+
const existing = await c8.body.env.NEWSLETTER_SUBSCRIBERS.get(key);
1717
if (!existing) {
18-
await c8.body.env.SUBSCRIBERS.put(key, JSON.stringify({ email, timestamp: new Date().toISOString() }));
18+
await c8.body.env.NEWSLETTER_SUBSCRIBERS.put(key, JSON.stringify({ email, timestamp: new Date().toISOString() }));
1919
}
2020
c8.var('newsletter_status', 'success');
2121
} catch (err) {

worker-configuration.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// worker-configuration.d.ts
21
/* eslint-disable */
3-
// Generated by Wrangler by running `wrangler types` (hash: 20ace0aa407b52b837870bf733c8ee45)
2+
// Generated by Wrangler by running `wrangler types` (hash: 247199c45bb5b6b411a8bba4f927a977)
43
// Runtime types generated with workerd@1.20250416.0 2025-04-03
54
declare namespace Cloudflare {
65
interface Env {
6+
NEWSLETTER_SUBSCRIBERS: KVNamespace;
77
OPENAI_MODEL: "gpt-4.1-nano";
88
OPENAI_API_KEY: string;
99
CACHE: DurableObjectNamespace<import("./src/index").HtmlCacheDurableObject>;

0 commit comments

Comments
 (0)