public Result <IList <BlogPost> > GetPostsOfCurrentUser(string token)
        {
            var user =
                _tokenValidator.ValidateToken(token);

            if (user == null)
            {
                return(Result <IList <BlogPost> > .Unauthorized);
            }

            return(new Result <IList <BlogPost> >(_blogPostRepository.GetByUserId(user.Id)));
        }