public async Task <HttpResponseMessage> GetMemberNotification(string aspNetUserId) { ItemResponse <MemberNotification> response = new ItemResponse <MemberNotification>(); try { response.Item = _memberProfileService.NotifyMember(aspNetUserId); if (response.Item.IsOnline == false) { if (response.Item.AlertUsingTextMessage == true) { string message = "You got a new match! Log on to Snatched to see who it is!"; _smsService.SendSms(response.Item.PhoneNumber, message); } if (response.Item.AlertUsingEmail == true) { await _sendEmailService.SendEmailMatchNotification(response.Item.Email); } } return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }