mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-04 22:21:36 +09:00
M #: Modify Zendesk request (#4686)
Signed-off-by: dcarracedo <dcarracedo@opennebula.io>
This commit is contained in:
1 parent
e8c5d67ba9
commit
60f65789ec
1 file changed
+10
-4
@@ -237,10 +237,16 @@ const list = (
|
||||
|
||||
return respond(response, next, async () => {
|
||||
const client = zendesk.createClient(session.zendesk)
|
||||
const tickets = await client.requests.list({
|
||||
sort_by: 'created_at',
|
||||
sort_order: 'desc',
|
||||
})
|
||||
// requests.list() follows every pagination link. Fetch only the first
|
||||
// cursor page to preserve the previous limit of 100 tickets.
|
||||
const { result: tickets } = await client.requests.get([
|
||||
'requests',
|
||||
{
|
||||
sort_by: 'created_at',
|
||||
sort_order: 'desc',
|
||||
page: 1,
|
||||
},
|
||||
])
|
||||
const ticketCount = {
|
||||
new: 0,
|
||||
open: 0,
|
||||
|
||||
Reference in new issue
Block a user