[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
|
// Check user token
|
||||||
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
||||||
|
$username = $user->getUsername($user_id)
|
||||||
// Fetch transaction summary
|
// Fetch transaction summary
|
||||||
$aTransactionSummary = $transaction->getTransactionSummary($user_id);
|
$aTransactionSummary = $transaction->getTransactionSummary($user_id);
|
||||||
|
|
||||||
// Output JSON format
|
// Output JSON format
|
||||||
$data = array(
|
$data = array(
|
||||||
'username' => $user->getUsername($user_id),
|
'username' => $username,
|
||||||
'shares' => $statistics->getUserShares($user_id),
|
'shares' => $statistics->getUserShares($username),
|
||||||
'hashrate' => $statistics->getUserHashrate($user_id),
|
'hashrate' => $statistics->getUserHashrate($username),
|
||||||
'sharerate' => $statistics->getUserSharerate($user_id)
|
'sharerate' => $statistics->getUserSharerate($username)
|
||||||
);
|
);
|
||||||
echo $api->get_json($data);
|
echo $api->get_json($data);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user