From d9770fd3df0877dd7158ab8254c7cda4b462e8dd Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 11 Nov 2021 14:51:36 +0000 Subject: [PATCH] fix: await promises This change adds missing await statements. This change doesn't fix the skipped tests, only changing the result from a crash application to a 500 response. Refs #425 --- src/backend/controllers/request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/controllers/request.js b/src/backend/controllers/request.js index 8390d43f..6af8cf38 100644 --- a/src/backend/controllers/request.js +++ b/src/backend/controllers/request.js @@ -61,8 +61,8 @@ export default function controller(reqModel, preprintModel, thisUser) { let isPreprintAuthor = false; if ( ctx.query.isAuthor && - (thisUser.isMemberOf('partners', authorPersona.uuid) || - thisUser.isMemberOf('admins', authorPersona.uuid)) + (await thisUser.isMemberOf('partners', authorPersona.uuid) || + await thisUser.isMemberOf('admins', authorPersona.uuid)) ) { isPreprintAuthor = true; }