Skip to content

Commit

Permalink
Corrected admin-login functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
JAVillarino committed Feb 24, 2024
1 parent c5767db commit b709503
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function AdminLogin() {
console.log(res)
const resJSON = await res.json()
console.log(resJSON)
alert(resJSON["message"])
alert(resJSON.response)
} catch (error) {
console.error("Error verifying PIN:", error)
}
Expand Down
3 changes: 1 addition & 2 deletions src/app/api/verify/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { NextResponse } from 'next/server'
export async function POST(req: Request) {

// how to get the user pin ?
const { userPin } = await req.json();

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 b709503

Please sign in to comment.