claims api retrieval tweaks
This commit is contained in:
parent
74932d02a2
commit
65924fdb3c
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ class ClaimsController extends AppController {
|
||||||
$conditions['Claims.Id <'] = $beforeId;
|
$conditions['Claims.Id <'] = $beforeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
$claims = $this->Claims->find()->contain(['Stream', 'Publisher' => ['fields' => ['Name']]])->where($conditions)->
|
$claims = $this->Claims->find()->contain(['Stream', 'Publisher' => ['fields' => ['Name']]])->distinct(['Claims.ClaimId'])->where($conditions)->
|
||||||
limit($pageLimit)->order($order)->toArray();
|
limit($pageLimit)->order($order)->toArray();
|
||||||
|
|
||||||
return $this->_jsonResponse(['success' => true, 'claims' => $claims, 'total' => (int) $numClaims]);
|
return $this->_jsonResponse(['success' => true, 'claims' => $claims, 'total' => (int) $numClaims]);
|
||||||
|
|
Loading…
Reference in a new issue