mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Hash Password
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import bcrypt from 'bcryptjs';
|
||||
import prisma from "@/app/prisma";
|
||||
|
||||
interface Body {
|
||||
@@ -21,7 +22,7 @@ export async function POST(request: NextRequest) {
|
||||
username: body.username,
|
||||
name: body.name,
|
||||
email: body.email,
|
||||
password: body.password,
|
||||
password: await bcrypt.hash(body.password, 10),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user