mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
changes the returned key from UserID to id, in accordance with getUserData
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
9d121985dc
commit
99075825e3
5 changed files with 13 additions and 13 deletions
|
|
@ -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, [
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
));
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -429,7 +429,7 @@ const actions = {
|
|||
addUser({commit, dispatch}, { userid, password, displayName, email, groups, subadmin, quota, language }) {
|
||||
return api.requireAdmin().then((response) => {
|
||||
return api.post(OC.linkToOCS(`cloud/users`, 2), { userid, password, displayName, email, groups, subadmin, quota, language })
|
||||
.then((response) => dispatch('addUserData', userid || response.data.ocs.data.UserID))
|
||||
.then((response) => dispatch('addUserData', userid || response.data.ocs.data.id))
|
||||
.catch((error) => {throw error;});
|
||||
}).catch((error) => {
|
||||
commit('API_FAILURE', { userid, error });
|
||||
|
|
|
|||
Loading…
Reference in a new issue