не шлём пустые строки у АИ в ответе
This commit is contained in:
parent
dea576f164
commit
b09e587220
@ -8,6 +8,7 @@ import { replaceSpacesToEmptyLines } from "../components/ViewPublicationPage/too
|
|||||||
import { QuizSettings } from "@model/settingsData";
|
import { QuizSettings } from "@model/settingsData";
|
||||||
import * as Bowser from "bowser";
|
import * as Bowser from "bowser";
|
||||||
import { domain } from "../utils/defineDomain";
|
import { domain } from "../utils/defineDomain";
|
||||||
|
import { statusOfQuiz } from "@/utils/hooks/useQuestionFlowControl";
|
||||||
let SESSIONS = "";
|
let SESSIONS = "";
|
||||||
|
|
||||||
const md = new MobileDetect(window.navigator.userAgent);
|
const md = new MobileDetect(window.navigator.userAgent);
|
||||||
@ -193,7 +194,8 @@ export function sendAnswer({ questionId, body, qid, preview = false }: SendAnswe
|
|||||||
const answers = [
|
const answers = [
|
||||||
{
|
{
|
||||||
question_id: questionId,
|
question_id: questionId,
|
||||||
content: body, //тут массив с ответом
|
//Для АИ квизов нельзя слать пустые строки
|
||||||
|
content: statusOfQuiz != "ai" ? body : body.length ? body : "-", //тут массив с ответом
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
formData.append("answers", JSON.stringify(answers));
|
formData.append("answers", JSON.stringify(answers));
|
||||||
|
Loading…
Reference in New Issue
Block a user