Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Nov 25, 2024
1 parent 08e62da commit e39f856
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions api.planx.uk/modules/send/email/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
export const sendToEmail: SendIntegrationController = async (
req,
res,
next
next,
) => {
req.setTimeout(120 * 1000); // Temporary bump to address submission timeouts

Expand Down Expand Up @@ -51,7 +51,7 @@ export const sendToEmail: SendIntegrationController = async (
const response = await sendEmail(
"submit",
teamSettings.submissionEmail,
config
config,
);

// Mark session as submitted so that reminder and expiry emails are not triggered
Expand All @@ -63,7 +63,7 @@ export const sendToEmail: SendIntegrationController = async (
localAuthority,
teamSettings.submissionEmail,
config,
response
response,
);

return res.status(200).send({
Expand Down
16 changes: 9 additions & 7 deletions api.planx.uk/modules/send/email/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ export const TEAM_EMAIL_SETTINGS_QUERY = `

export async function getTeamEmailSettings(localAuthority: string) {
const response = await $api.client.request<GetTeamEmailSettings>(
gql`${TEAM_EMAIL_SETTINGS_QUERY}`,
gql`
${TEAM_EMAIL_SETTINGS_QUERY}
`,
{
slug: localAuthority,
}
},
);

return response?.teams[0];
Expand All @@ -52,7 +54,7 @@ export async function getSessionData(sessionId: string) {
`,
{
id: sessionId,
}
},
);

return response?.session?.data;
Expand Down Expand Up @@ -83,12 +85,12 @@ export async function getSessionEmailDetailsById(sessionId: string) {
`,
{
id: sessionId,
}
},
);

if (!response.session)
throw Error(
`Cannot find session ${sessionId} in GetSessionEmailDetails query`
`Cannot find session ${sessionId} in GetSessionEmailDetails query`,
);

return response.session;
Expand All @@ -108,7 +110,7 @@ export async function insertAuditEntry(
sendEmailResponse: {
message: string;
expiryDate?: string;
}
},
) {
const response = await $api.client.request<CreateEmailApplication>(
gql`
Expand Down Expand Up @@ -138,7 +140,7 @@ export async function insertAuditEntry(
recipient: recipient,
request: notifyRequest,
response: sendEmailResponse,
}
},
);

return response?.application?.id;
Expand Down

0 comments on commit e39f856

Please sign in to comment.