public HttpResponseMessage Dismiss(DismissDTO postData) { try { var recipient = InternalMessagingController.Instance.GetMessageRecipient(postData.NotificationId, UserInfo.UserID); if (recipient != null) { NotificationsController.Instance.DeleteNotificationRecipient(postData.NotificationId, UserInfo.UserID); return Request.CreateResponse(HttpStatusCode.OK, new {Result = "success"}); } return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Unable to dismiss notification"); } catch (Exception exc) { Logger.Error(exc); return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, exc); } }