From 23535253a74dab622e31566077e8d66a1dce24c6 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Thu, 3 Aug 2023 12:36:58 -0300 Subject: [PATCH] add logs --- .../question/services/globalParser.question.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/question/services/globalParser.question.service.ts b/src/modules/question/services/globalParser.question.service.ts index 944dd5b..4a8b052 100644 --- a/src/modules/question/services/globalParser.question.service.ts +++ b/src/modules/question/services/globalParser.question.service.ts @@ -23,7 +23,7 @@ export class GlobalParserQuestionService { ) {} // createOrUpdateQuestion async export({ lang, res }) { - console.log(lang); + console.log('language:', lang); const { id: languageId } = await this.languageRepository.findOne({ where: { code: lang || 'en' }, }); @@ -51,6 +51,8 @@ export class GlobalParserQuestionService { }); const resData = await query.getMany(); + console.log('questionQuantity', resData.length); + console.log('data', resData); if (!resData) { return res.status(404).send('Question not found'); @@ -59,6 +61,7 @@ export class GlobalParserQuestionService { const $ = cheerio.load(`
`); const questionDivs = resData.map((question) => { + console.log(question.id); const questionDiv = $(`
`); const questionContent = $( `
${question.questionTranslations[0].content}
`,