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
1 changed files with 1 additions and 1 deletions

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