Skip to content

Commit

Permalink
Update env validation fn type usage
Browse files Browse the repository at this point in the history
  • Loading branch information
infomiho committed Oct 30, 2024
1 parent c46f961 commit 3d27ce2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions waspc/examples/todoApp/src/env.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as z from 'zod'
import type { EnvValidationFn } from 'wasp/env'

export const serverEnvValidationFn: EnvValidationFn = () =>
export const serverEnvValidationFn = (() =>
z.object({
MY_ENV_VAR: z.string({
required_error: 'MY_ENV_VAR is required.',
}),
})
})) satisfies EnvValidationFn

export const clientEnvValidationFn: EnvValidationFn = () =>
export const clientEnvValidationFn = (() =>
z.object({
REACT_APP_NAME: z.string().default('TODO App'),
})
})) satisfies EnvValidationFn

0 comments on commit 3d27ce2

Please sign in to comment.