Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-06-21 17:38:25 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-06-21 17:38:25 +0300
commit99075825e37ea49800bb451a243e7d09b68a7f8d (patch)
tree55e6e3436122ba5fd032d3bd6ebfbc6873f44cdc /apps/provisioning_api
parent9d121985dc2980ca9c3b4a69d807926d2424757d (diff)
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.php2
-rw-r--r--apps/provisioning_api/tests/Controller/UsersControllerTest.php12
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()
));
}