From 6d4f00a137d3a54d8f1abb539472e6bf0fbe9423 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:18:16 +0200 Subject: [PATCH] fix echo test --- restapi/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index 7f1eefb75..211386a55 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -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(); ?>