Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Nov 25, 2024
1 parent e39f856 commit 2ad7978
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 3 additions & 7 deletions api.planx.uk/modules/send/email/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ interface GetTeamEmailSettings {
}[];
}

export const TEAM_EMAIL_SETTINGS_QUERY = `
export async function getTeamEmailSettings(localAuthority: string) {
const response = await $api.client.request<GetTeamEmailSettings>(
gql`
query GetTeamEmailSettings($slug: String) {
teams(where: { slug: { _eq: $slug } }) {
teamSettings: team_settings {
Expand All @@ -24,12 +26,6 @@ export const TEAM_EMAIL_SETTINGS_QUERY = `
}
}
}
`;

export async function getTeamEmailSettings(localAuthority: string) {
const response = await $api.client.request<GetTeamEmailSettings>(
gql`
${TEAM_EMAIL_SETTINGS_QUERY}
`,
{
slug: localAuthority,
Expand Down
3 changes: 2 additions & 1 deletion editor.planx.uk/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import HelmetProvider from "react-navi-helmet-async";
import { ToastContainer } from "react-toastify";

// init airbrake before everything else
import * as airbrake from "./airbrake";
import { client } from "./lib/graphql";
import navigation from "./lib/navigation";
import { defaultTheme } from "./theme";
Expand Down Expand Up @@ -49,7 +50,7 @@ const hasJWT = (): boolean | void => {

// If JWT not set via cookie, check search params
const jwtSearchParams = new URLSearchParams(window.location.search).get(
"jwt"
"jwt",
);
if (!jwtSearchParams) return false;

Expand Down

0 comments on commit 2ad7978

Please sign in to comment.