Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Nov 3, 2023
1 parent d21fa29 commit f1fdab0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion server/src/core/server/app/handlers/api/dsaReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type AdminDownloadOptions = Pick<AppOptions, "mongo" | "i18n">;

export const reportDownloadHandler = ({
mongo,
i18n
i18n,
}: AdminDownloadOptions): RequestHandler<TenantCoralRequest> => {
return async (req, res, next) => {
const { tenant, now } = req.coral;
Expand Down
54 changes: 28 additions & 26 deletions server/src/core/server/services/dsaReports/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,32 +153,34 @@ export async function sendReportDownload(
]);
break;
case "DECISION_MADE":
const details =
reportHistoryItem.decision?.legality === "ILLEGAL"
? `${translate(
bundle,
"Legality: Illegal",
"dsaReportCSV-legality-illegal"
)}\n${translate(
bundle,
"Legal grounds",
"dsaReportCSV-legalGrounds"
)}: ${reportHistoryItem.decision.legalGrounds}\n${translate(
bundle,
"Explanation",
"dsaReportCSV-explanation"
)}: ${reportHistoryItem.decision.detailedExplanation}`
: `${translate(
bundle,
"Legality: Legal",
"dsaReportCSV-legality-legal"
)}`;
csv.write([
formatter.format(reportHistoryItem.createdAt),
reportCommentAuthor?.username,
translate(bundle, "Made decision", "dsaReportCSV-madeDecision"),
details,
]);
{
const details =
reportHistoryItem.decision?.legality === "ILLEGAL"
? `${translate(
bundle,
"Legality: Illegal",
"dsaReportCSV-legality-illegal"
)}\n${translate(
bundle,
"Legal grounds",
"dsaReportCSV-legalGrounds"
)}: ${reportHistoryItem.decision.legalGrounds}\n${translate(
bundle,
"Explanation",
"dsaReportCSV-explanation"
)}: ${reportHistoryItem.decision.detailedExplanation}`
: `${translate(
bundle,
"Legality: Legal",
"dsaReportCSV-legality-legal"
)}`;
csv.write([
formatter.format(reportHistoryItem.createdAt),
reportCommentAuthor?.username,
translate(bundle, "Made decision", "dsaReportCSV-madeDecision"),
details,
]);
}
break;
case "SHARE":
csv.write([
Expand Down

0 comments on commit f1fdab0

Please sign in to comment.