mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update doc-survey-widget.tsx
This commit is contained in:
parent
bd425f9144
commit
160d5c9396
@ -299,6 +299,10 @@ const SurveyFinished = (props: {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const generateRandomSurveyId = () => {
|
||||||
|
return Math.random().toString(36).substring(7);
|
||||||
|
};
|
||||||
|
|
||||||
const createSurvey = async ({ body }: { body: DocSurveyCreateDto }) => {
|
const createSurvey = async ({ body }: { body: DocSurveyCreateDto }) => {
|
||||||
const response = await fetch(`${DOC_SURVEY_URL}?surveyId=${generateRandomSurveyId()}`, {
|
const response = await fetch(`${DOC_SURVEY_URL}?surveyId=${generateRandomSurveyId()}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
Loading…
Reference in New Issue
Block a user