mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 15:10:54 +03:00
Begin implementing a reporting mechanism
This commit is contained in:
@@ -4,9 +4,13 @@ module.exports = async function(req, res) {
|
||||
const id = req.params.id;
|
||||
const meta = req.meta;
|
||||
try {
|
||||
if (meta.dead && !meta.flagged) {
|
||||
return res.sendStatus(404);
|
||||
}
|
||||
const ttl = await storage.ttl(id);
|
||||
res.send({
|
||||
metadata: meta.metadata,
|
||||
flagged: !!meta.flagged,
|
||||
finalDownload: meta.dl + 1 === meta.dlimit,
|
||||
ttl
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user