public ActionResult Share(string id, [FromBody] ShareViewModel model)
        {
            var ownerId = HttpContext.User.Identity.Name;

            if (!storyRepository.IsOwner(id, ownerId))
            {
                return(Forbid("You are not the owner of this story"));
            }

            var userToShare = userRepository.GetSingle(u => u.Username == model.Username);

            if (userToShare == null)
            {
                return(BadRequest(new { username = "******" }));
            }
            var owner = userRepository.GetSingle(s => s.Id == ownerId);
            var story = storyRepository.GetSingle(s => s.Id == id, s => s.Shares);

            if (story.OwnerId == ownerId)
            {
                return(BadRequest(new { username = "******" }));
            }

            var existingShare = story.Shares.Find(l => l.UserId == userToShare.Id);

            if (existingShare == null)
            {
                shareRepository.Add(new Share
                {
                    UserId  = userToShare.Id,
                    StoryId = id
                });
                shareRepository.Commit();
                hubContext.Clients.User(userToShare.Id).SendAsync(
                    "notification",
                    new Notification <ShareRelatedPayload>
                {
                    NotificationType = NotificationType.SHARE,
                    Payload          = new ShareRelatedPayload
                    {
                        Username   = owner.Username,
                        StoryTitle = story.Title
                    }
                }
                    );
            }
            return(NoContent());
        }