Skip to content

Commit

Permalink
changes for register user.
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinovpankaj committed Feb 22, 2024
1 parent 0881b10 commit 49cb557
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions routes/user-endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ router.route('/register')
.post( function(req, res) {
try {
// Get user input
const { first_name, last_name, email, password,username,access_type,companyIdentifier } = req.body;
const { first_name, last_name, email, password,username,access_type } = req.body;

// Validate user input
if (!(email && password && first_name && last_name&&username && companyIdentifier)) {
if (!(email && password && first_name && last_name&&username)) {
res.status(400).send("All input is required");
return;
}

var companyIdentifier = req.user.company;
// check if user already exist
// Validate if user exist in our database

Expand Down

0 comments on commit 49cb557

Please sign in to comment.