Skip to content

Commit

Permalink
[UPDATE][#2713] Adding transaction filter
Browse files Browse the repository at this point in the history
API now supports filters just as the GUI version, closing #2713 :)
  • Loading branch information
TheSerapher authored May 12, 2018
1 parent 61670a1 commit 01c75f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/pages/api/getusertransactions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
// Force limit
$limit = 100;
}
if (isset($_REQUEST['filter']) && is_array($_REQUEST['filter'])) {
$filter = $_REQUEST['filter'];
} else {
$filter = NULL;
}

$data['transactions'] = $transaction->getTransactions($start, NULL, $limit, $user_id);
$data['transactions'] = $transaction->getTransactions($start, $filter, $limit, $user_id);

// Fetch summary if enabled
if (!$setting->getValue('disable_transactionsummary')) {
Expand Down

0 comments on commit 01c75f4

Please sign in to comment.