auditory
All checks were successful
Deploy / CreateImage (push) Successful in 7m12s
Deploy / DeployService (push) Successful in 24s

This commit is contained in:
Nastya 2025-06-04 18:07:55 +03:00
parent d675530480
commit 29ed7e4120

@ -57,6 +57,9 @@ type PublicationMakeRequestParams = {
method: "POST";
};
const urlParams = new URLSearchParams(window.location.search);
const paudParam = urlParams.get("_paud");
export const publicationMakeRequest = ({ url, body }: PublicationMakeRequestParams) => {
return axios(url, {
data: body,
@ -81,6 +84,14 @@ export async function getData({ quizId }: { quizId: string }): Promise<{
isRecentlyCompleted: boolean;
error?: AxiosError;
}> {
const body = {
quiz_id: quizId,
limit: 100,
page: 0,
need_config: true,
} as any;
if (paudParam) body.auditory = paudParam;
try {
const { data, headers } = await axios<GetQuizDataResponse>(
domain + `/answer/v1.0.0/settings${window.location.search}`,
@ -94,12 +105,7 @@ export async function getData({ quizId }: { quizId: string }): Promise<{
OS: OSDevice,
Browser: userAgent,
},
data: {
quiz_id: quizId,
limit: 100,
page: 0,
need_config: true,
},
data: body,
}
);
const sessions = JSON.parse(localStorage.getItem("sessions") || "{}");