NextJS_DOC/pages/api/createuser.js

14 lines
434 B
JavaScript
Raw Permalink Normal View History

2023-03-24 10:11:04 +00:00
import prisma from '../../lib/Prisma'
export default async function handle(req, res) {
const {email, name, token, details} = req.body;
const result = await prisma.users.create({
data : {
email: email,
name: name,
token: token,
details: details
}
});
res.json(result);
}