Skip to content

Commit

Permalink
Round estimated size before sending response and add units
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Jun 3, 2022
1 parent e427f61 commit 3858dd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ public function exportable(?array $migrators): DataResponse {
}

return new DataResponse([
'size' => $size,
'size' => round($size, -2),
'units' => 'KiB',
'warning' => $warning ?? null,
], Http::STATUS_OK);
}
Expand Down

0 comments on commit 3858dd9

Please sign in to comment.