Skip to content

Commit

Permalink
Update allow lists
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Nov 13, 2024
1 parent 2c8eaf3 commit 4dea212
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { gql } from "graphql-request";

import { Passport } from "@opensystemslab/planx-core";

import { $api } from "../../../../client/index.js";
import type { Operation } from "../sanitiseApplicationData/types.js";

Expand Down Expand Up @@ -31,6 +32,7 @@ const ALLOW_LIST = [
"service.type",
"usedFOIYNPP",
"user.role",
"_feedback",
];

export const getAnalyzeSessionOperations = (): Operation[] => [
Expand Down Expand Up @@ -61,7 +63,7 @@ export const trackAllowListAnswers: Operation = async () => {

const id = await updateLowcalSessionAllowListAnswers(
sessionId,
allowListAnswers,
allowListAnswers
);
if (id) updatedSessionIds.push(id);
}
Expand Down Expand Up @@ -101,7 +103,7 @@ export const getSubmittedUnAnalyzedSessionIds = async (): Promise<string[]> => {
*/
export const updateLowcalSessionAllowListAnswers = async (
sessionId: string,
allowListAnswers: Passport["data"],
allowListAnswers: Passport["data"]
): Promise<string> => {
try {
const mutation = gql`
Expand All @@ -124,7 +126,7 @@ export const updateLowcalSessionAllowListAnswers = async (
return id;
} catch (error) {
throw new Error(
`Error updating allow_list_answers for lowcal_session ${sessionId}`,
`Error updating allow_list_answers for lowcal_session ${sessionId}`
);
}
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DocumentNode } from "@apollo/client";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { PASSPORT_FEEDBACK_KEY } from "@planx/components/Feedback/Public/Public";
import Bowser from "bowser";
import { publicClient } from "lib/graphql";
import React, { createContext, useContext, useEffect } from "react";
Expand Down Expand Up @@ -59,6 +60,7 @@ export const ALLOW_LIST = [
"service.type",
"usedFOIYNPP",
"user.role",
PASSPORT_FEEDBACK_KEY,
] as const;

let lastVisibleNodeAnalyticsLogId: number | undefined = undefined;
Expand Down

0 comments on commit 4dea212

Please sign in to comment.