Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add code to post request #43

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/app/api/user/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export const POST = async (request: NextRequest) => {
},
});

await prisma.code.create({
data: {
codeString: "",
expire: new Date(),
userId: savedUser.id,
},
});

return NextResponse.json({
code: "SUCCESS",
message: `User created with email: ${savedUser.email}`,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ForgotPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ export default function ForgotPasswordForm() {

<button
className="w-full justify-center flex flex-row bg-teal-600 px-4.5 py-2.5 text-white rounded-lg place-items-center text-[14px] font-semibold leading-[20px]"
onClick={() => router.push("/public/login")}
onClick={() => router.push("/public/signIn")}
>
Back to Log in
</button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function LoginForm() {
fontFamily: "Kepler Std",
}}
>
Welcome back!
Welcome!
</div>
<div className="text-[#667085] text-[18px] font-normal mb-[10px]">
Please enter your details
Expand Down Expand Up @@ -144,7 +144,7 @@ export default function LoginForm() {
/>

<button className="ml-[40px] text-[#145A5A] font-medium">
Forget Password
Forgot password?
</button>
</div>

Expand Down
Loading