seppulcro
seppulcro
WWasp
Created by seppulcro on 2/15/2025 in #πŸ™‹questions
authRequired custom fn
Is it currently possible to define our custom auth checking functions? From my understanding we can use middleware for api endpoints, but pages/routes do not support functions/loaders/middlewares? The auth hooks also do not have any hook for checkUserAuth, meaning if I want to check current user for valid data before allowing him to access a route I am not able to? I understand that I can also do these checks via Queries/Actions so that the user is validated before any data operations happen,
18 replies
WWasp
Created by seppulcro on 2/15/2025 in #πŸ™‹questions
Invalid discriminator value. Expected 'development' | 'production'
Hey everyone I'm trying out wasp and sadhly on version: "^0.16.0" everytime i try to run a db seed following: https://wasp.sh/docs/data-model/backends#seeding-the-database I always get ❯ wasp db seed devSeedSimple [ Db ] Environment variables loaded from .env [ Db ] Running seed command npm run db-seed ... [ Db ] [ Db ] > [email protected] db-seed [ Db ] > npm run bundle && node --enable-source-maps -r dotenv/config bundle/dbSeed.js [ Db ] [ Db ] [ Db ] > [email protected] bundle [ Db ] > rollup --config --silent [ Db ] [ Db !] [ Db !] ══ Env vars validation failed ══ [ Db !] [ Db !] - Invalid discriminator value. Expected 'development' | 'production' [ Db !] [ Db !] ════════════════════════════════ [ Db !] /Volumes/Sensitive/Development/.wasp/out/sdk/wasp/env/validation.ts:20 [ Db !] throw new Error('Error parsing environment variables') [ Db !] ^ [ Db !] [ Db !] [ Db !] Error: Error parsing environment variables [ Db !] at ensureEnvSchema (/Volumes/Sensitive/Development/work/.wasp/out/sdk/wasp/env/validation.ts:20:13) [ Db !] at <anonymous> (/Volumes/Sensitive/Development/work/.wasp/out/sdk/wasp/server/env.ts:68:20) [ Db !] at ModuleJob.run (node:internal/modules/esm/module_job:272:25) [ Db !] at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:583:26) [ Db !] at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:98:5) [ Db !] [ Db !] Node.js v23.7.0 [ Db !] [ Db !] An error occurred while running the seed command: [ Db !] Error: Command failed with exit code 1: npm run db-seed ❌ --- [Error] Database seeding failed: ------------------------------------------- Failed with exit code 1
12 replies