diff --git a/web/src/lib/components/TinySurvey.svelte b/web/src/lib/components/TinySurvey.svelte index ec5201e..805af0e 100644 --- a/web/src/lib/components/TinySurvey.svelte +++ b/web/src/lib/components/TinySurvey.svelte @@ -35,8 +35,8 @@ responses.source = source; } - if ($appConfig.surveyUrl) { - fetch($appConfig.surveyUrl, { + if ($appConfig.survey_url) { + fetch($appConfig.survey_url, { method: "POST", body: JSON.stringify(responses), headers: { @@ -48,7 +48,7 @@ } -{#if $appConfig.surveyUrl} +{#if $appConfig.survey_url}
{#if step === 0} {#if question}{@render question()}{:else} diff --git a/web/src/lib/stores/config.ts b/web/src/lib/stores/config.ts index c4c0bd4..4187307 100644 --- a/web/src/lib/stores/config.ts +++ b/web/src/lib/stores/config.ts @@ -23,12 +23,12 @@ import { writable } from "svelte/store"; interface AppConfig { report_retention?: number; - surveyUrl?: string; + survey_url?: string; } const defaultConfig: AppConfig = { report_retention: 0, - surveyUrl: "", + survey_url: "", }; function getConfigFromScriptTag(): AppConfig | null {