public async Task <IActionResult> RegisterAsync([FromBody] RegisterModel registerModel)
        {
            var account = AccountAdapter.RegisterModelToModel(registerModel);

            if (account == null || !ModelState.IsValid)
            {
                throw new CustomException("Errors.INVALID_REGISTRATION_DATA", "Errors.INVALID_REGISTRATION_DATA_MSG");
            }

            try
            {
                if (registerModel.PhoneNumber != null)
                {
                    var formatedPhoneNumber = PhoneNumbers.PhoneNumberHelpers.GetFormatedPhoneNumber(registerModel.PhoneNumber);
                    account.PhoneNumber = formatedPhoneNumber;
                }
                //standardize phone number
            }
            catch (NumberParseException)
            {
                throw new CustomException("Errors.INVALID_PHONE_NUMBER", "Errors.INVALID_PHONE_NUMBER_MSG");
            }

            account.AccountPermissions = new List <Models.AccountPermission>()
            {
                new Models.AccountPermission
                {
                    PermissionId = "MEMBER"
                }
            };
            string password = account.Password;

            account = await _accountService.CreateAsync(account, account.Password);

            //publish a jobseeker account is created message to rabbit mq bus
            await _rawRabbitBus.PublishAsync(new AccountCreatedForEmail { Id = account.AccountId, Password = password, Birthday = registerModel.Birthday, Position = registerModel.Position, PhoneNumber = account.PhoneNumber, FirstName = registerModel.FirstName, LastName = registerModel.LastName, Email = registerModel.Email, LoginUrl = CommonContants.LoginUrl });

            //string smsContent = $"Verification code at JobHop: {account.VerificationCodes.First().VerifyCode}";

            ////send SMS using eSMS.vn
            //var response = await _esmsService.SendSMS(account.PhoneNumber, smsContent, 4);

            var viewModel = AccountAdapter.ToViewModel(account);


            return(new JsonResult(viewModel));
        }