Skip to content
Snippets Groups Projects
Verified Commit 46d55305 authored by Damien's avatar Damien
Browse files

FEAT Return entities after creation

parent fd02bca0
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ class EntityControllerTest extends TestCase
$response = $entityController->create($fullRequest, new \Slim\Http\Response());
$responseBody = json_decode((string)$response->getBody());
$this->assertSame('TEST-ENTITY123', $responseBody->entityId);
$this->assertInternalType('array', $responseBody->entities);
// READ
$environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
......
......@@ -163,7 +163,7 @@ class EntityController
'eventId' => 'entityCreation',
]);
return $response->withJson(['entityId' => $data['entity_id']]);
return $response->withJson(['entities' => EntityModel::getAllowedEntitiesByUserId(['userId' => $GLOBALS['userId']])]);
}
public function update(Request $request, Response $response, array $aArgs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment