feat: use more default values
This commit is contained in:
@@ -4,6 +4,10 @@ import { NextResponse } from 'next/server';
|
||||
|
||||
export async function POST(req: Request) {
|
||||
try {
|
||||
if(!process.env.API_KEY){
|
||||
throw new Error('API KEY environment variable is not set')
|
||||
}
|
||||
|
||||
const body = await req.json();
|
||||
|
||||
const result = RequestSchema.safeParse(body);
|
||||
|
||||
Reference in New Issue
Block a user