DEV Community

Margaret W.N
Margaret W.N

Posted on

 

User Signup adjustments

I made a few a adjustments to my user model. The signup should require the first name, last name and the email should be unique.

const userModel = new Schema(
  {
    firstName: {
      type: String,
      required: true
    },
    lastName: {
      type: String,
      required: true
    },
    email: {
      type: String,
      required: true,
      unique: true
    },
  }
);
Enter fullscreen mode Exit fullscreen mode

Day 24

Latest comments (0)

Need a better mental model for async/await?

Check out this classic DEV post on the subject.

⭐️🎀 JavaScript Visualized: Promises & Async/Await

async await