<commit_before>//var TopicController = require("../Controller/TopicController");
var Question = require("../Controller/QuestionController");
var multer = require('multer')
var uploading = multer({dest: __dirname + '../../uploadImage/', limits: {fileSize: 1000000, files:1}})

module.exports = function(app){
    // API
    /*
    app.post('/api/:lang/user/training/question', function(req, res){
        console.log("/api/"+req.params.lang);
        var language = req.params.lang;
        TopicController.getNextQuestion(language, function (result) {
            res.json(result);
        });
    });*/
    
    app.route('/api/:lang/userquestion',uploading)
        .post(Question.createQuestion)
        .put(Question.editQuestion)
        .get(Question.getQuestions);

    app.route('/api/:lang/userquestion/:questionId')
        .get(Question.getQuestion);

    app.route('/api/:lang/usertraining/questionstatistics')
        .put(Question.updatestatisticsQuestion);

    
};<commit_msg>Question model updated<commit_after>//var TopicController = require("../Controller/TopicController");
var Question = require("../Controller/QuestionController");
var multer = require('multer')
var uploading = multer({dest: __dirname + '../../uploadImage/', limits: {fileSize: 1000000, files:1}})

module.exports = function(app){
    // API
    /*
    app.post('/api/:lang/user/training/question', function(req, res){
        console.log("/api/"+req.params.lang);
        var language = req.params.lang;
        TopicController.getNextQuestion(language, function (result) {
            res.json(result);
        });
    });*/
    
    app.route('/api/:lang/userquestion')
        .post(Question.createQuestion)
        .put(Question.editQuestion)
        .get(Question.getQuestions);

    app.route('/api/:lang/userquestion/:questionId')
        .get(Question.getQuestion);

    app.route('/api/:lang/usertraining/questionstatistics')
        .put(Question.updatestatisticsQuestion);

    
};
{'fraction_non_alphanumeric': 0.1669188098840141, 'fraction_numerical': 0.008068582955118508, 'mean_word_length': 3.1247401247401245, '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': '5509287', 'n_tokens_mistral': 582, 'n_tokens_neox': 569, 'n_words': 82}