fix(pages): fix average size of uploads

This commit is contained in:
diced 2021-06-23 14:24:42 -07:00
parent dab444040e
commit d628424b35
No known key found for this signature in database
GPG key ID: 85AB64C74535D76E
2 changed files with 2 additions and 1 deletions

View file

@ -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}>

View file

@ -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,