mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2026-04-28 03:07:38 +02:00
Checking if possible answer exist, before saving it
This commit is contained in:
@@ -300,10 +300,8 @@ function compareQuestionObj(
|
||||
q1: Question,
|
||||
q1subjName: string,
|
||||
q2: Question,
|
||||
q2subjName: string,
|
||||
data: QuestionData
|
||||
q2subjName: string
|
||||
): any {
|
||||
assert(data !== undefined || data !== null)
|
||||
assert(q1)
|
||||
assert(typeof q1 === 'object')
|
||||
assert(q2)
|
||||
@@ -369,8 +367,7 @@ function searchSubject(
|
||||
currentQuestion,
|
||||
subjName,
|
||||
question,
|
||||
subj.Name,
|
||||
question.data
|
||||
subj.Name
|
||||
)
|
||||
|
||||
if (percent.avg >= minMatchAmmount) {
|
||||
|
||||
Reference in New Issue
Block a user