Release 2.18 (#4878)
This commit is contained in:
@@ -31,7 +31,7 @@ final class ConfigurationController extends BaseApiController
|
||||
* Returns the timesheet configuration
|
||||
*/
|
||||
#[OA\Response(response: 200, description: 'Returns the instance specific timesheet configuration', content: new OA\JsonContent(ref: new Model(type: TimesheetConfig::class)))]
|
||||
#[Route(methods: ['GET'], path: '/config/timesheet')]
|
||||
#[Route(path: '/config/timesheet', methods: ['GET'])]
|
||||
public function timesheetConfigAction(SystemConfiguration $configuration): Response
|
||||
{
|
||||
$model = new TimesheetConfig();
|
||||
@@ -46,4 +46,17 @@ final class ConfigurationController extends BaseApiController
|
||||
|
||||
return $this->viewHandler->handle($view);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the configured color codes and names
|
||||
*/
|
||||
#[OA\Response(response: 200, description: 'Returns the configured color codes and names', content: new OA\JsonContent(type: 'object', example: ['Red' => '#ff0000'], additionalProperties: new OA\AdditionalProperties(type: 'string')))]
|
||||
#[Route(path: '/config/colors', methods: ['GET'])]
|
||||
public function colorConfigAction(SystemConfiguration $configuration): Response
|
||||
{
|
||||
$view = new View($configuration->getThemeColors(), 200);
|
||||
$view->getContext()->setGroups(['Default']);
|
||||
|
||||
return $this->viewHandler->handle($view);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user