Skip to content

Commit

Permalink
fix: support @iitkgp.ac.in mails
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Aug 14, 2024
1 parent 571c305 commit d6e40be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func register(res http.ResponseWriter, req *http.Request) {

// Generate username from institute email
userEmail := jwtValidateResp.Email
username := strings.TrimSuffix(userEmail, "@kgpian.iitkgp.ac.in")
username := strings.Split(userEmail, "@")[0]

// Check if user already exists or not
rowD := db.QueryRow(`SELECT id FROM user WHERE user=?`, username)
Expand Down

0 comments on commit d6e40be

Please sign in to comment.