mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix: NaN
stats
This commit is contained in:
parent
d1267360c8
commit
5b4f69ec9e
@ -1,2 +1,2 @@
|
||||
module.exports.getAvgResolutionTime = tickets => (tickets.reduce((total, ticket) => total + (ticket.closedAt - ticket.createdAt), 0) ?? 1) / tickets.length;
|
||||
module.exports.getAvgResponseTime = tickets => (tickets.reduce((total, ticket) => total + (ticket.firstResponseAt - ticket.createdAt), 0) ?? 1) / tickets.length;
|
||||
module.exports.getAvgResolutionTime = tickets => (tickets.reduce((total, ticket) => total + (ticket.closedAt - ticket.createdAt), 0) || 1) / tickets.length;
|
||||
module.exports.getAvgResponseTime = tickets => (tickets.reduce((total, ticket) => total + (ticket.firstResponseAt - ticket.createdAt), 0) || 1) / tickets.length;
|
||||
|
Loading…
Reference in New Issue
Block a user