Skip to content

Commit 475d267

Browse files
committed
fix(api): sync worker bindings
1 parent 22deb15 commit 475d267

2 files changed

Lines changed: 1441 additions & 218 deletions

File tree

apps/api/src/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ import z from "zod";
2020
import { version } from "../package.json";
2121

2222
type ScrapeResponse = Awaited<ReturnType<(typeof Platforms)[keyof typeof Platforms]["transform"]>>;
23-
type Bindings = CloudflareBindings & { OTEL_ENDPOINT: string };
2423

25-
const config: ResolveConfigFn<Bindings> = (env) => {
24+
const config: ResolveConfigFn<CloudflareBindings> = (env) => {
2625
if (!env.OTEL_ENDPOINT) throw new Error("OTEL_ENDPOINT is required.");
2726

2827
return {
@@ -31,7 +30,7 @@ const config: ResolveConfigFn<Bindings> = (env) => {
3130
};
3231
};
3332

34-
const app = new Hono<{ Bindings: Bindings }>()
33+
const app = new Hono<{ Bindings: CloudflareBindings }>()
3534
.use("*", httpInstrumentationMiddleware())
3635
.use(cors())
3736
.use(prettyJSON())
@@ -110,8 +109,6 @@ const app = new Hono<{ Bindings: Bindings }>()
110109
try {
111110
raw = await p.fetch(id, {
112111
EMBED_USER_AGENT: c.env.EMBED_USER_AGENT,
113-
REDDIT_CLIENT_ID: c.env.REDDIT_CLIENT_ID,
114-
REDDIT_CLIENT_SECRET: c.env.REDDIT_CLIENT_SECRET,
115112
});
116113
} catch (cause) {
117114
const problem = createProblem(EmbedlyErrors.PlatformFetchFailed, {

0 commit comments

Comments
 (0)