Skip to content

Commit

Permalink
fix: await promises
Browse files Browse the repository at this point in the history
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
  • Loading branch information
thewilkybarkid committed Nov 11, 2021
1 parent b93d436 commit d9770fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/controllers/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d9770fd

Please sign in to comment.