diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-06-21 16:38:25 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-06-21 16:38:25 +0200 |
commit | 99075825e37ea49800bb451a243e7d09b68a7f8d (patch) | |
tree | 55e6e3436122ba5fd032d3bd6ebfbc6873f44cdc /apps/provisioning_api | |
parent | 9d121985dc2980ca9c3b4a69d807926d2424757d (diff) | |
download | nextcloud-server-99075825e37ea49800bb451a243e7d09b68a7f8d.tar.gz nextcloud-server-99075825e37ea49800bb451a243e7d09b68a7f8d.zip |
changes the returned key from UserID to id, in accordance with getUserData
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 2 | ||||
-rw-r--r-- | apps/provisioning_api/tests/Controller/UsersControllerTest.php | 12 |
2 files changed, 7 insertions, 7 deletions
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() )); } |