1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-27 21:19:09 -05:00

Flatten returned stats

This commit is contained in:
Jack Foltz 2019-01-01 17:29:04 -05:00
parent 8c440ffa6f
commit af4d65e1c5
Signed by: foltik
GPG Key ID: D1F0331758D1F29A
2 changed files with 6 additions and 6 deletions

View File

@ -40,12 +40,10 @@ router.get('/uploads', requireAuth('stats.get'), bodyVerifier(uploadProps), wrap
date: upload.date, date: upload.date,
uid: upload.uid, uid: upload.uid,
key: upload.uploaderKey, key: upload.uploaderKey,
file: {
originalName: upload.file.originalName, originalName: upload.file.originalName,
size: upload.file.size, size: upload.file.size,
mime: upload.file.mime mime: upload.file.mime
} }
}
}); });
res.status(200).json(uploads); res.status(200).json(uploads);

View File

@ -985,7 +985,9 @@ describe('Stats', () => {
stat.should.have.property('date'); stat.should.have.property('date');
stat.should.have.property('uid'); stat.should.have.property('uid');
stat.should.have.property('key'); stat.should.have.property('key');
stat.should.have.property('file'); stat.should.have.property('originalName');
stat.should.have.property('size');
stat.should.have.property('mime');
return util.logout(agent); return util.logout(agent);
}); });