14 lines
434 B
JavaScript
14 lines
434 B
JavaScript
|
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);
|
||
|
}
|