Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions app/middleware/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,9 @@ function requireAuth(req, res, next) {
* out of the strict 403 (like /v1/whoami).
*/
async function resolveAuth(req, res, next) {
let attachOk = false;
await new Promise((resolve) => {
attachAuth(req, res, () => { attachOk = true; resolve(); });
attachAuth(req, res, () => resolve());
});
if (!attachOk) return; // attachAuth already sent a 500
return requireAuth(req, res, next);
}

Expand Down