예제 #1
0
        public IActionResult Register([FromBody] User model)
        {
            try
            {
                Log.Information($"Creating new user for {JsonConvert.SerializeObject(model)}");

                var resultMessage = _userSvc.Register(model);
                return(Ok(new
                {
                    message = resultMessage
                }));
            }
            catch (Exception ex)
            {
                Log.Error($"Failed to register user, Name: {model.FirstName} {model.LastName}; Username: {model.Username} : {ex.Message}");
            }
            return(StatusCode(500));
        }