@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | $app->get('/version', 'App\Controller\DefaultController:getVersion'); |
| 5 | 5 | $app->get('/status', 'App\Controller\DefaultController:getStatus'); |
| 6 | 6 | |
| 7 | -$app->group('/api/v1', function () use ($app) { |
|
| 8 | - $app->group('/tasks', function () use ($app) { |
|
| 7 | +$app->group('/api/v1', function() use ($app) { |
|
| 8 | + $app->group('/tasks', function() use ($app) { |
|
| 9 | 9 | $app->get('', 'App\Controller\Task\GetAllTasks:getTasks'); |
| 10 | 10 | $app->get('/[{id}]', 'App\Controller\Task\GetOneTask:getTask'); |
| 11 | 11 | $app->get('/search/[{query}]', 'App\Controller\Task\SearchTasks:searchTasks'); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $app->put('/[{id}]', 'App\Controller\Task\UpdateTask:updateTask'); |
| 14 | 14 | $app->delete('/[{id}]', 'App\Controller\Task\DeleteTask:deleteTask'); |
| 15 | 15 | }); |
| 16 | - $app->group('/users', function () use ($app) { |
|
| 16 | + $app->group('/users', function() use ($app) { |
|
| 17 | 17 | $app->get('', 'App\Controller\User\GetAllUsers:getUsers'); |
| 18 | 18 | $app->get('/[{id}]', 'App\Controller\User\GetOneUser:getUser'); |
| 19 | 19 | $app->get('/search/[{query}]', 'App\Controller\User\SearchUsers:searchUsers'); |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | $container = $app->getContainer(); |
| 6 | 6 | |
| 7 | 7 | // PDO database library |
| 8 | -$container['db'] = function (ContainerInterface $c) { |
|
| 8 | +$container['db'] = function(ContainerInterface $c) { |
|
| 9 | 9 | $settings = $c->get('settings')['db']; |
| 10 | 10 | $pdo = new PDO( |
| 11 | 11 | 'mysql:host=' . $settings['host'] . ';dbname=' . $settings['dbname'], |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | }; |
| 20 | 20 | |
| 21 | 21 | // Logger |
| 22 | -$container['logger'] = function (ContainerInterface $c) { |
|
| 22 | +$container['logger'] = function(ContainerInterface $c) { |
|
| 23 | 23 | $settings = $c->get('settings')['logger']; |
| 24 | 24 | if ($settings['enabled'] === false) { |
| 25 | 25 | return false; |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @param Request $request |
| 17 | 17 | * @param Response $response |
| 18 | 18 | * @param array $args |
| 19 | - * @return array |
|
| 19 | + * @return Response |
|
| 20 | 20 | */ |
| 21 | 21 | public function createTask($request, $response, $args) |
| 22 | 22 | { |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @param Request $request |
| 17 | 17 | * @param Response $response |
| 18 | 18 | * @param array $args |
| 19 | - * @return array |
|
| 19 | + * @return Response |
|
| 20 | 20 | */ |
| 21 | 21 | public function updateTask($request, $response, $args) |
| 22 | 22 | { |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @param Request $request |
| 17 | 17 | * @param Response $response |
| 18 | 18 | * @param array $args |
| 19 | - * @return array |
|
| 19 | + * @return Response |
|
| 20 | 20 | */ |
| 21 | 21 | public function createUser($request, $response, $args) |
| 22 | 22 | { |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @param Request $request |
| 17 | 17 | * @param Response $response |
| 18 | 18 | * @param array $args |
| 19 | - * @return array |
|
| 19 | + * @return Response |
|
| 20 | 20 | */ |
| 21 | 21 | public function updateUser($request, $response, $args) |
| 22 | 22 | { |