refactor: make ensureAuthenticated async

This commit is contained in:
Joe Previte
2021-06-02 13:27:55 -07:00
parent 0cdbd33b46
commit 91303d4e40
4 changed files with 8 additions and 8 deletions

View File

@ -18,7 +18,7 @@ router.get("/(:commit)(/*)?", async (req, res) => {
// Used by VS Code to load extensions into the web worker.
const tar = getFirstString(req.query.tar)
if (tar) {
ensureAuthenticated(req)
await ensureAuthenticated(req)
let stream: Readable = tarFs.pack(pathToFsPath(tar))
if (req.headers["accept-encoding"] && req.headers["accept-encoding"].includes("gzip")) {
logger.debug("gzipping tar", field("path", tar))