Added missing endpoint get track question template by id

GET /api/v1/track-question-templates/{track_question_template_id}

Change-Id: I2a45c65834e8f555f66191a37002cacc87b36928
This commit is contained in:
Sebastian Marcet 2018-09-14 18:05:15 -03:00
parent 10e1b1c424
commit 453c276687
2 changed files with 11 additions and 1 deletions

View File

@ -215,7 +215,9 @@ final class OAuth2TrackQuestionsTemplateApiController extends OAuth2ProtectedCon
$track_question_template = $this->track_question_template_repository->getById($track_question_template_id);
if (is_null($track_question_template)) return $this->error404();
return $this->ok(SerializerRegistry::getInstance()->getSerializer($track_question_template)->serialize());
return $this->ok(SerializerRegistry::getInstance()->getSerializer($track_question_template)->serialize(
Request::input('expand', '')
));
}
catch (ValidationException $ex1) {
Log::warning($ex1);

View File

@ -2119,6 +2119,14 @@ class ApiEndpointsSeeder extends Seeder
sprintf(SummitScopes::WriteTrackQuestionTemplateData, $current_realm),
],
],
[
'name' => 'get-track-question-templates',
'route' => '/api/v1/track-question-templates/{track_question_template_id}',
'http_method' => 'GET',
'scopes' => [
sprintf(SummitScopes::ReadAllSummitData, $current_realm)
],
],
[
'name' => 'get-track-question-templates-metadata',
'route' => '/api/v1/track-question-templates/metadata',