Skip to content

Commit

Permalink
Merge pull request #8 from pranjalkole/main
Browse files Browse the repository at this point in the history
fix something
  • Loading branch information
kushalag02 authored Jan 22, 2025
2 parents 65e9ad2 + a827b08 commit 2967ece
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions models/Student.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ const studentSchema = new Schema({
type: String,
required: true,
},
instituteEmail: {
type: String,
required: true,
unique: true,
},
phoneno: {
type: String,
required: true,
Expand Down
7 changes: 3 additions & 4 deletions src/routes/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ router.post(
email: any
password: any
institute: any
instituteEmail: any | undefined
instituteEmail: any
phoneno: number
profilePage: any
gitlabProfile: any
Expand All @@ -62,6 +62,7 @@ router.post(
email,
password,
institute,
instituteEmail,
phoneno,
profilePage,
gitlabProfile,
Expand All @@ -76,16 +77,14 @@ router.post(
email,
password: password_hash,
institute,
instituteEmail,
phoneno,
profilePage,
gitlabProfile,
githubProfile,
otherProfile,
firstTime,
}
if (req.body.instituteEmail !== undefined) {
student.instituteEmail = req.body.instituteEmail
}
let user = new Student(student)
const token = generateToken({ email: email })
console.log(token)
Expand Down

0 comments on commit 2967ece

Please sign in to comment.