Skip to content

Commit

Permalink
Cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
JAVillarino committed Feb 24, 2024
1 parent b709503 commit 7253511
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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/`, {
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/verify/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7253511

Please sign in to comment.