예제 #1
0
        public async Task <Topic> FindByIdAsync([Required] FindByIdParams parameters)
        {
            // Check if user is authenticated
            await _authentication.AuthenticateAsync(parameters.AuthToken);

            return(await _repository.Topics.FindAsync(parameters.TopicId));
        }
예제 #2
0
        public async Task <Comment> FindByIdAsync([Required] FindByIdParams parameters)
        {
            // Check if player is authenticated
            await _authentication.AuthenticateAsync(parameters.AuthToken);

            return(await _repository.Comments.FindAsync(parameters.CommentId));
        }
예제 #3
0
        public async Task <Question> FindByIdAsync([Required] FindByIdParams parameters)
        {
            // Check if user is authenticated
            await _authentication.AuthenticateAsync(parameters.AuthToken);

            // Returns the given id
            return(await _repository.Questions.FindAsync(parameters.QuestionId));
        }