import type { NextApiRequest , NextApiResponse } from 'next' ; import prisma from '../../lib/prisma' ; export default async function handle ( req , res ) { const result = await prisma . user . create ( { data : { ... req . body , } , } ) ; res . json ( result ) ; }