Deskripsi:
- Create validasi
- Create register
- create global prisma, color tune,dan global state
This commit is contained in:
2023-10-02 22:13:08 +08:00
parent 193dc27e9c
commit cf6aaf500e
32 changed files with 1094 additions and 97 deletions

View File

@@ -0,0 +1,20 @@
import { MyConsole } from "@/app/fun/my_console";
import prisma from "@/app/lib/prisma";
import { NextResponse } from "next/server";
export async function POST(req: Request) {
if (req.method === "POST") {
const body = await req.json();
MyConsole(body);
try {
await fetch(
`https://wa.wibudev.com/code?nom=${body.nomor}&text=${body.otp}`
);
return NextResponse.json({ body, status: 200, message: "Login Success" });
} catch (error) {
return NextResponse.json({ status: 500, message: "Server Error !!!" });
}
}
return NextResponse.json({ success: false });
}