added /api/info/:id route

This commit is contained in:
Danny Coates 2018-01-30 12:15:09 -08:00
parent 81534d2c13
commit 97ad674be2
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
20 changed files with 74 additions and 38 deletions

View file

@ -29,8 +29,7 @@ module.exports = async function(req, res) {
const ttl = await storage.ttl(id);
res.send({
metadata: meta.metadata,
dtotal: +meta.dl,
dlimit: +meta.dlimit,
finalDownload: +meta.dl + 1 === +meta.dlimit,
size,
ttl
});