Skip to content

Commit

Permalink
readability improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rfontanarosa committed Dec 28, 2024
1 parent 7d7acec commit 90fbc04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions functions/src/common/datastore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ export class Datastore {
);
return leftOuterJoinSorted(
loisIterator,
v1 => v1.get(l.id),
loiDoc => loiDoc.get(l.id),
submissionsIterator,
v2 => v2.get(sb.loiId)
submissionDoc => submissionDoc.get(sb.loiId)
);
}

Expand Down
3 changes: 1 addition & 2 deletions functions/src/export-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export async function exportCsvHandler(
res.status(HttpStatus.FORBIDDEN).send('Permission denied');
return;
}
const canManageSurvey = canImport(user, surveyDoc);
const ownerId = !canManageSurvey ? userId : undefined;
const ownerId = canImport(user, surveyDoc) ? undefined : userId;

console.log(
`Exporting survey '${surveyId}', job '${jobId}', owner '${
Expand Down

0 comments on commit 90fbc04

Please sign in to comment.