Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ValbuenaG committed Aug 3, 2023
1 parent 492390e commit 2353525
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
});
Expand Down Expand Up @@ -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');
Expand All @@ -59,6 +61,7 @@ export class GlobalParserQuestionService {
const $ = cheerio.load(`<div id='questions'></div>`);

const questionDivs = resData.map((question) => {
console.log(question.id);
const questionDiv = $(`<div data-question-id='${question.id}'></div>`);
const questionContent = $(
`<div>${question.questionTranslations[0].content}</div>`,
Expand Down

0 comments on commit 2353525

Please sign in to comment.