From 52da431388eb7dbf36372e0ce3170ceb0bc1122c Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 12 May 2021 13:30:22 -0700 Subject: [PATCH] misplaced await --- src/routes/volumes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/volumes.js b/src/routes/volumes.js index 344904b5f..27607290b 100644 --- a/src/routes/volumes.js +++ b/src/routes/volumes.js @@ -19,7 +19,7 @@ const assert = require('assert'), async function load(req, res, next) { assert.strictEqual(typeof req.params.id, 'string'); - const [error, result] = safe(await volumes.get(req.params.id)); + const [error, result] = await safe(volumes.get(req.params.id)); if (error) return next(BoxError.toHttpError(error)); if (!result) return next(new HttpError(404, 'Volume not found')); req.resource = result;