fix: customer list ordering with limit
This commit is contained in:
parent
56ad9e6f00
commit
b93a4c2088
1 changed files with 1 additions and 0 deletions
|
|
@ -538,6 +538,7 @@ function getCustomersList (phone = null, name = null, address = null, id = null,
|
|||
AND ($6 IS NULL OR id_card_data::json->>'address' = $6)
|
||||
AND ($7 IS NULL OR id_card_data::json->>'documentNumber' = $7)
|
||||
AND ($8 IS NULL OR email = $8)
|
||||
ORDER BY last_active DESC
|
||||
limit $3`
|
||||
return db.any(sql, [ passableErrorCodes, anonymous.uuid, NUM_RESULTS, phone, name, address, id, email ])
|
||||
.then(customers => Promise.all(_.map(customer =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue