File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,9 +20,8 @@ import z from "zod";
2020import { version } from "../package.json" ;
2121
2222type 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 , {
You can’t perform that action at this time.
0 commit comments