Merge pull request #1873 from rog1121/master
Use Defined Limit on getusertransactions API
This commit is contained in:
commit
d17eec85d0
@ -8,13 +8,13 @@ $api->isActive();
|
|||||||
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
||||||
|
|
||||||
// Fetch transactions
|
// Fetch transactions
|
||||||
if (isset($_REQUEST['limit']) && $_REQUEST['limit'] < 30) {
|
if (isset($_REQUEST['limit']) && $_REQUEST['limit'] <= 100) {
|
||||||
$limit = $_REQUEST['limit'];
|
$limit = $_REQUEST['limit'];
|
||||||
} else {
|
} else {
|
||||||
// Force limit
|
// Force limit
|
||||||
$limit = 5;
|
$limit = 100;
|
||||||
}
|
}
|
||||||
$data['transactions'] = $transaction->getTransactions(0, NULL, 30, $user_id);
|
$data['transactions'] = $transaction->getTransactions(0, NULL, $limit, $user_id);
|
||||||
|
|
||||||
// Fetch summary if enabled
|
// Fetch summary if enabled
|
||||||
if (!$setting->getValue('disable_transactionsummary')) {
|
if (!$setting->getValue('disable_transactionsummary')) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user