From 99075825e37ea49800bb451a243e7d09b68a7f8d Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 21 Jun 2019 16:38:25 +0200 Subject: changes the returned key from UserID to id, in accordance with getUserData Signed-off-by: Arthur Schiwon --- apps/provisioning_api/lib/Controller/UsersController.php | 2 +- .../tests/Controller/UsersControllerTest.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'apps') diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 252db66c35e..c4afdd40fdf 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -337,7 +337,7 @@ class UsersController extends AUserData { } } - return new DataResponse(['UserID' => $userid]); + return new DataResponse(['id' => $userid]); } catch (HintException $e ) { $this->logger->logException($e, [ diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 63f9d4c376a..64def2c551e 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -357,7 +357,7 @@ class UsersControllerTest extends TestCase { ->willReturn(true); $this->assertTrue(key_exists( - 'UserID', + 'id', $this->api->addUser('NewUser', 'PasswordOfTheNewUser')->getData() )); } @@ -417,7 +417,7 @@ class UsersControllerTest extends TestCase { ->with('NewUser', 'display', 'DisplayNameOfTheNewUser'); $this->assertTrue(key_exists( - 'UserID', + 'id', $api->addUser('NewUser', 'PasswordOfTheNewUser', 'DisplayNameOfTheNewUser')->getData() )); } @@ -467,7 +467,7 @@ class UsersControllerTest extends TestCase { ->willReturnCallback(function() { return (string)rand(1000000000, 9999999999); }); $this->assertTrue(key_exists( - 'UserID', + 'id', $this->api->addUser('', 'PasswordOfTheNewUser')->getData() )); } @@ -556,7 +556,7 @@ class UsersControllerTest extends TestCase { ->willReturn(true); $this->assertTrue(key_exists( - 'UserID', + 'id', $this->api->addUser('NewUser', 'PasswordOfTheNewUser')->getData() )); } @@ -617,7 +617,7 @@ class UsersControllerTest extends TestCase { ); $this->assertTrue(key_exists( - 'UserID', + 'id', $this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup'])->getData() )); } @@ -838,7 +838,7 @@ class UsersControllerTest extends TestCase { ->willReturn(true); $this->assertTrue(key_exists( - 'UserID', + 'id', $this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup1', 'ExistingGroup2'])->getData() )); } -- cgit v1.2.3