public async Task <IActionResult> RegisterNewLetter([FromBody] EmailRegisterModel emailRegisterModel) { if (_newsLetterRepository.IsEmailRegistered(emailRegisterModel.Email)) { return(StatusCode(AppStatusCode.EmailRegistered)); } var result = await _newsLetterRepository.RegisterSubscriptionEmail(emailRegisterModel.Email); if (!result) { return(BadRequest()); } return(Ok()); }