mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-10 21:22:35 +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);
|
|
}
|
|
};
|