예제 #1
0
        public async Task Post([FromBody] RegisterBodyData data)
        {
            if (ModelState.IsValid)
            {
                var registrationData = data.ToDTO();
                var result           = await registrationProcess.Register(registrationData);

                Ok();
            }
            BadRequest(ModelState);
        }
예제 #2
0
 public static RegisterDTO ToDTO(this RegisterBodyData data)
 {
     return(new RegisterDTO
     {
         Username = data.Username,
         Email = data.Email,
         FullName = data.FullName,
         Password = data.Password,
         IsActive = true
     });
 }