fix echo test

This commit is contained in:
Uwe Steinmann 2021-09-27 10:18:16 +02:00
parent 28ddd4b5b2
commit 6d4f00a137

View File

@ -2328,8 +2328,8 @@ class TestController { /* {{{ */
$this->container = $container;
}
public function echoData($request, $response) { /* {{{ */
return $response->withJson(array('success'=>true, 'message'=>'This is the result of the echo call.', 'data'=>''), 200);
public function echoData($request, $response, $args) { /* {{{ */
return $response->withJson(array('success'=>true, 'message'=>'This is the result of the echo call.', 'data'=>$args['data']), 200);
} /* }}} */
} /* }}} */
@ -2504,7 +2504,7 @@ $app->post('/categories', \RestapiController::class.':createCategory');
$app->put('/categories/{id}/name', \RestapiController::class.':changeCategoryName');
$app->get('/attributedefinitions', \RestapiController::class.':getAttributeDefinitions');
$app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName');
$app->get('/echo', \TestController::class.':echoData');
$app->get('/echo/{data}', \TestController::class.':echoData');
$app->run();
?>