mirror of https://github.com/apache/cloudstack.git
Update apikey/secretkey in transaction
This commit is contained in:
parent
baf6b6eb82
commit
a3fb4cf9c1
|
|
@ -1777,7 +1777,7 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
return _accountDao.findUserAccountByApiKey(apiKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override @DB
|
||||
public String[] createApiKeyAndSecretKey(RegisterCmd cmd) {
|
||||
Long userId = cmd.getId();
|
||||
|
||||
|
|
@ -1787,8 +1787,11 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
|
||||
// generate both an api key and a secret key, update the user table with the keys, return the keys to the user
|
||||
String[] keys = new String[2];
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
txn.start();
|
||||
keys[0] = createUserApiKey(userId);
|
||||
keys[1] = createUserSecretKey(userId);
|
||||
txn.commit();
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue