fix(pages): fix average size of uploads
This commit is contained in:
parent
dab444040e
commit
d628424b35
2 changed files with 2 additions and 1 deletions
|
@ -132,7 +132,7 @@ export default function Dashboard() {
|
||||||
<Card name='Size' sx={{ height: '100%' }}>
|
<Card name='Size' sx={{ height: '100%' }}>
|
||||||
<StatText>{stats.size}</StatText>
|
<StatText>{stats.size}</StatText>
|
||||||
<Typography variant='h3'>Average Size</Typography>
|
<Typography variant='h3'>Average Size</Typography>
|
||||||
<StatText>{bytesToRead(stats.size / stats.count)}</StatText>
|
<StatText>{bytesToRead(stats.size_num / stats.count)}</StatText>
|
||||||
</Card>
|
</Card>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12} sm={4}>
|
<Grid item xs={12} sm={4}>
|
||||||
|
|
|
@ -51,6 +51,7 @@ async function handler(req: NextApiReq, res: NextApiRes) {
|
||||||
|
|
||||||
return res.json({
|
return res.json({
|
||||||
size: bytesToRead(size),
|
size: bytesToRead(size),
|
||||||
|
size_num: size,
|
||||||
count,
|
count,
|
||||||
count_by_user,
|
count_by_user,
|
||||||
count_users,
|
count_users,
|
||||||
|
|
Loading…
Reference in a new issue