<commit_before>var models = require('../models');

// GET /question
exports.question = function(req, res, next) {
	models.quiz.findOne().then(function(quiz) {
		if (quiz) {
			var answer = req.query.answer || '';
			res.render('quizes/question', {question: 'Capital de Italia', answer: answer});
		} else {
			throw new Error('No hay preguntas en la BBDD.');
		}
	}).catch(function(error) {
		next(error);
	});
};

// GET /check
exports.check = function(req, res, next) {
	models.quiz.findOne().then(function(quiz) {
		if (quiz) {
			var answer = req.query.answer || '';
			var result = answer === quiz.answer ? 'correcta' : 'incorrecta';
			res.render('quizes/result', {result: result, answer: answer});
		} else {
			throw new Error('No hay preguntas en la BBDD.');
		}<commit_msg>base de datos1.1<commit_after>var models = require('../models');

// GET /question
exports.question = function(req, res, next) {
	models.Quiz.findOne().then(function(quiz) {
		if (quiz) {
			var answer = req.query.answer || '';
			res.render('quizes/question', {question: 'Capital de Italia', answer: answer});
		} else {
			throw new Error('No hay preguntas en la BBDD.');
		}
	}).catch(function(error) {
		next(error);
	});
};

// GET /check
exports.check = function(req, res, next) {
	models.Quiz.findOne().then(function(quiz) {
		if (quiz) {
			var answer = req.query.answer || '';
			var result = answer === quiz.answer ? 'correcta' : 'incorrecta';
			res.render('quizes/result', {result: result, answer: answer});
		} else {
			throw new Error('No hay preguntas en la BBDD.');
		}
{'fraction_non_alphanumeric': 0.18546845124282982, 'fraction_numerical': 0.0012746972594008922, 'mean_word_length': 3.7289156626506026, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6694059', 'n_tokens_mistral': 585, 'n_tokens_neox': 549, 'n_words': 132}