File tree Expand file tree Collapse file tree
packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 " WebFetch(domain:raw.githubusercontent.com)" ,
1818 " WebFetch(domain:api.github.com)" ,
1919 " WebFetch(domain:tanstack.com)" ,
20- " WebFetch(domain:www.npmjs.com)"
20+ " WebFetch(domain:www.npmjs.com)" ,
21+ " Bash(gh api *)"
2122 ],
2223 "deny" : []
2324 }
Original file line number Diff line number Diff line change @@ -5,7 +5,12 @@ import { inngest } from '../../inngest/client'
55import { helloWorld } from '../../inngest/functions'
66
77const sendHelloEvent = createServerFn ( { method : 'POST' } )
8- . inputValidator ( ( name : string ) => name )
8+ . inputValidator ( ( name : unknown ) => {
9+ if ( typeof name !== 'string' ) throw new Error ( 'Name must be a string' )
10+ const trimmed = name . trim ( )
11+ if ( ! trimmed ) throw new Error ( 'Name is required' )
12+ return trimmed
13+ } )
914 . handler ( async ( { data : name } ) => {
1015 const { ids } = await inngest . send ( helloWorld . create ( { name } ) )
1116 return { eventId : ids [ 0 ] }
@@ -95,7 +100,7 @@ function RouteComponent() {
95100 < li >
96101 Uncomment < code > INNGEST_DEV=1</ code > in < code > .env.local</ code > { ' ' }
97102 during development — without it, the SDK defaults to cloud mode and
98- will try to authenticate against Inngest Cloud.You can also use `INNGEST_DEV=1 pnpm dev` to start the application.
103+ will try to authenticate against Inngest Cloud. You can also use `INNGEST_DEV=1 pnpm dev` to start the application.
99104 </ li >
100105 < li >
101106 Run the Dev Server in a second terminal:{ ' ' }
You can’t perform that action at this time.
0 commit comments