mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 14:10:53 +03:00
Use async function instead of promise (#325)
This commit is contained in:
@@ -142,7 +142,7 @@ app.get('/download/:id', async (req, res) => {
|
||||
try {
|
||||
const filename = await storage.filename(id);
|
||||
const contentLength = await storage.length(id);
|
||||
const timeToExpiry = storage.ttl(id);
|
||||
const timeToExpiry = await storage.ttl(id);
|
||||
res.render('download', {
|
||||
filename: decodeURIComponent(filename),
|
||||
filesize: bytes(contentLength),
|
||||
|
||||
Reference in New Issue
Block a user