public async Task <IActionResult> Signup(MemberForSignupDto memberForSignupDto) { memberForSignupDto.Email = memberForSignupDto.Email.ToLower(); if (await _signupRepo.EmailExists(memberForSignupDto.Email)) { throw new Exception("That email has already registered"); } var newMember = new Member { Email = memberForSignupDto.Email, Name = memberForSignupDto.Name }; await _signupRepo.Signup(newMember); return(StatusCode(201)); }