Skip to content

Commit

Permalink
Fix: correct caculations for mailcow widget
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Sep 27, 2024
1 parent 50ccb0b commit 76fd074
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widgets/mailcow/component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default function Component({ service }) {
}

const domains = resultData.length;
const mailboxes = resultData.reduce((acc, val) => acc + val.mboxes_in_domain, 0);
const mails = resultData.reduce((acc, val) => acc + val.msgs_total, 0);
const storage = resultData.reduce((acc, val) => acc + val.bytes_total, 0);
const mailboxes = resultData.reduce((acc, val) => acc + parseInt(val.mboxes_in_domain, 10), 0);
const mails = resultData.reduce((acc, val) => acc + parseInt(val.msgs_total, 10), 0);
const storage = resultData.reduce((acc, val) => acc + parseInt(val.bytes_total, 10), 0);

return (
<Container service={service}>
Expand Down

0 comments on commit 76fd074

Please sign in to comment.