Skip to content

Commit

Permalink
fix(api): Fixed used / size percentage being wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Oct 1, 2020
1 parent c835118 commit 1bc4aab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/status/status.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export class StatusService {
const folderSize = await this.getFolderSize()

const freePercentage = parseFloat(((disk.available / disk.total) * 100).toFixed(2))
const usedPercentage = parseFloat((((disk.total - disk.available) / folderSize) * 100).toFixed(2))
const sizePercentage = parseFloat((((disk.total - disk.available - folderSize) / disk.total) * 100).toFixed(2))
const usedPercentage = parseFloat(((folderSize / (disk.total - disk.available)) * 100).toFixed(2))
const sizePercentage = 100 - freePercentage - usedPercentage

return {
version: 'unknown', // TODO:: Get git tag
Expand Down

0 comments on commit 1bc4aab

Please sign in to comment.