From 725351136c14f3f3c7f2a44d9a62e9356f3c877d Mon Sep 17 00:00:00 2001 From: Joel Villarino Date: Sat, 24 Feb 2024 14:33:01 -0600 Subject: [PATCH] Cleaned up code --- src/app/admin/page.tsx | 4 ---- src/app/api/verify/route.ts | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index c55e8e6..546bdde 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -18,15 +18,11 @@ function AdminLogin() { ...formData, [name]: value, }) - // const newText = event.target.value; - // setInputText(newText); - // Call the function that returns the output } const handleFormSubmit = (e: { preventDefault: () => void }) => { e.preventDefault() - // PLACEHOLDER - alert saying "Submitted!" const verifyPIN = async (pin: string) => { try { const res = await fetch(`${process.env.NEXT_PUBLIC_SITE_URL}/api/verify/`, { diff --git a/src/app/api/verify/route.ts b/src/app/api/verify/route.ts index dbeeb02..e82af42 100644 --- a/src/app/api/verify/route.ts +++ b/src/app/api/verify/route.ts @@ -2,7 +2,7 @@ import { NextResponse } from 'next/server' export async function POST(req: Request) { - // how to get the user pin ? + // get the user pin const userPin = (await req.json()).pin; // get the password from the env file const actualPin = process.env.PRIVATE_KEY;