[Optimize] Switched calls to username from id
This commit is contained in:
parent
9ba717c080
commit
8f207bfe76
@ -8,16 +8,16 @@ $api->isActive();
|
||||
|
||||
// Check user token
|
||||
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
||||
|
||||
$username = $user->getUsername($user_id)
|
||||
// Fetch transaction summary
|
||||
$aTransactionSummary = $transaction->getTransactionSummary($user_id);
|
||||
|
||||
// Output JSON format
|
||||
$data = array(
|
||||
'username' => $user->getUsername($user_id),
|
||||
'shares' => $statistics->getUserShares($user_id),
|
||||
'hashrate' => $statistics->getUserHashrate($user_id),
|
||||
'sharerate' => $statistics->getUserSharerate($user_id)
|
||||
'username' => $username,
|
||||
'shares' => $statistics->getUserShares($username),
|
||||
'hashrate' => $statistics->getUserHashrate($username),
|
||||
'sharerate' => $statistics->getUserSharerate($username)
|
||||
);
|
||||
echo $api->get_json($data);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user