mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Checking if possible answer exist, before saving it
This commit is contained in:
parent
f5e157b147
commit
258ccec663
3 changed files with 37 additions and 18 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue