1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-10 05:02:45 +01:00

Use async function instead of promise (#325)

This commit is contained in:
Weihang Lo 2017-08-03 13:31:23 +08:00
parent bbe111a95e
commit 596ad871df
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7

View File

@ -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),