Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Commit

Permalink
Use async function instead of promise (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Aug 3, 2017
1 parent bbe111a commit 596ad87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 596ad87

Please # to comment.