done
This commit is contained in:
parent
875198f7e5
commit
3231e5021b
|
@ -20,6 +20,8 @@ export const signup = async (req, res) => {
|
|||
|
||||
// Hash the password
|
||||
const hashedPassword = await bcrypt.hash(password, 12);
|
||||
const randomNumber = generateRandomNumber().toString();
|
||||
const userId = `EF${randomNumber}`;
|
||||
|
||||
// Create new user
|
||||
const result = await UserModal.create({
|
||||
|
@ -31,6 +33,7 @@ export const signup = async (req, res) => {
|
|||
lastName,
|
||||
termsconditions,
|
||||
userType,
|
||||
userId:userId,
|
||||
});
|
||||
|
||||
// Generate JWT (if needed)
|
||||
|
|
|
@ -13,6 +13,7 @@ const userSchema = new mongoose.Schema({
|
|||
id: { type: String },
|
||||
resetToken: { type: String },
|
||||
resetTokenExpiration: { type: String },
|
||||
userId:{type:String},
|
||||
tokens:[
|
||||
{
|
||||
token:{
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -27,7 +27,7 @@
|
|||
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
|
||||
<!-- fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;800&family=Sen:wght@400;700;800&display=swap" rel="stylesheet">
|
||||
<script type="module" crossorigin src="/assets/index-dKDP2exv.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-DAjohXmt.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CyAHZLBw.css">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { useState } from "react";
|
||||
import axios from "axios";
|
||||
import Navbar from "./Navbar";
|
||||
import Footer from "../components/Footer";
|
||||
import Footer from "./Footer";
|
||||
import { NavLink } from "react-router-dom";
|
||||
|
||||
|
||||
|
||||
|
@ -111,12 +112,11 @@ const ForgotPassword = () => {
|
|||
<div className="d-flex gap-2 gap-md-4 flex-column flex-md-row justify-content-md-end mt-4">
|
||||
<p className="m-0 text-secondary text-center">
|
||||
Already have an account?{" "}
|
||||
<a
|
||||
href="#!"
|
||||
className="link-primary text-decoration-none"
|
||||
>
|
||||
Sign in
|
||||
</a>
|
||||
|
||||
<NavLink to="/login" className="link-primary text-decoration-none">
|
||||
Sign In
|
||||
</NavLink>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -129,7 +129,7 @@ const ForgotPassword = () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Footer />
|
||||
<Footer />
|
||||
</section>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue