mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-14 07:02:30 +01:00
15 lines
290 B
JavaScript
15 lines
290 B
JavaScript
const storage = require('../storage');
|
|
|
|
module.exports = async function(req, res) {
|
|
try {
|
|
const ttl = await storage.ttl(req.params.id);
|
|
return res.send({
|
|
dlimit: +req.meta.dlimit,
|
|
dtotal: +req.meta.dl,
|
|
ttl
|
|
});
|
|
} catch (e) {
|
|
res.sendStatus(404);
|
|
}
|
|
};
|