12 lines
283 B
JavaScript
12 lines
283 B
JavaScript
|
import prisma from '../../lib/Prisma'
|
||
|
|
||
|
export default async function handle(req, res) {
|
||
|
console.log(req.query.id);
|
||
|
const id = req.query.id;
|
||
|
const result = await prisma.users.delete({
|
||
|
where: {
|
||
|
id: parseInt(id),
|
||
|
}
|
||
|
});
|
||
|
res.json(result);
|
||
|
}
|