가입폼

This commit is contained in:
koreacomp5
2025-10-10 11:26:31 +09:00
parent 7ba8091ab9
commit 624276df08
3 changed files with 64 additions and 6 deletions

View File

@@ -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();