가입폼
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import prisma from "@/lib/prisma";
|
||||
import { registerSchema } from "@/lib/validation/auth";
|
||||
import { hash } from "crypto";
|
||||
|
||||
function hashPassword(pw: string) {
|
||||
// 간이 해시(데모): 실제론 bcrypt/scrypt/argon2 사용 권장
|
||||
return hash("sha256", Buffer.from(pw)).digest("hex");
|
||||
}
|
||||
import { hashPassword } from "@/lib/password";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const body = await req.json();
|
||||
|
||||
Reference in New Issue
Block a user