This commit is contained in:
Timur Ercan
2023-03-03 20:23:37 +01:00
parent 79c18316c3
commit 937ac79243

View File

@ -34,7 +34,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
const hashedPassword = await hashPassword(password);
const user = await prisma.user.upsert({
await prisma.user.upsert({
where: { email: cleanEmail },
update: {
password: hashedPassword,
@ -49,7 +49,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
},
});
res.status(201).json({ message: "Created user" });
res.status(201).end();
}
export default defaultHandler({