From 6e4c9b2405b857b9dda0b207921d7ce1ae4ea643 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Fri, 22 Dec 2023 17:21:31 +0100 Subject: [PATCH] API: Added event time --- resources/api/openapi.yml | 13 +++++++++---- src/Controllers/Api/IndexController.php | 6 ++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/resources/api/openapi.yml b/resources/api/openapi.yml index a485927c..ae9f8fab 100644 --- a/resources/api/openapi.yml +++ b/resources/api/openapi.yml @@ -391,12 +391,9 @@ components: properties: start: $ref: '#/components/schemas/DateTimeOptional' - end: - $ref: '#/components/schemas/DateTimeOptional' required: - start - - end - teardown: + event: type: object properties: start: @@ -406,6 +403,13 @@ components: required: - start - end + teardown: + type: object + properties: + end: + $ref: '#/components/schemas/DateTimeOptional' + required: + - end required: - api - spec @@ -414,6 +418,7 @@ components: - url - timezone - buildup + - event - teardown security: diff --git a/src/Controllers/Api/IndexController.php b/src/Controllers/Api/IndexController.php index 6f6c8776..54753bf8 100644 --- a/src/Controllers/Api/IndexController.php +++ b/src/Controllers/Api/IndexController.php @@ -67,10 +67,12 @@ class IndexController extends ApiController 'timezone' => (string) $config->get('timezone'), 'buildup' => [ 'start' => $config->get('buildup_start'), - 'end' => $config->get('buildup_end'), + ], + 'event' => [ + 'start' => $config->get('event_start'), + 'end' => $config->get('event_end'), ], 'teardown' => [ - 'start' => $config->get('teardown_start'), 'end' => $config->get('teardown_end'), ], ]];