<commit_before>var exposeData = function exposeXMSData (req, res, next) {
    next();
};
var cms = require('./lib/cms');
var loader = require('./lib/seed');
exports.handle = cms.handler;
exports.extend = function (app) {
    loader();
    //at this stage only one cms content route
    app.use(cms.handler);
    //get admin features and bolt them onto the app
    require('./lib/admin')(app);
};<commit_msg>update date fields to be dates<commit_after>'use strict';
var exposeData = function exposeXMSData (req, res, next) {
    next();
};
var cms = require('./lib/cms');
var loader = require('./lib/seed');
exports.handle = cms.handler;
exports.extend = function (app) {
    loader(function () {
        var pages = require('mongo-start')('pages');

        pages.find(function (err, docs) {
            for (var i = 0; i < docs.length; i++) {
                if(docs[i].publishOn !== null){
                    let po = new Date(docs[i].publishOn);
                    docs[i].publishOn = po;
                    let co = new Date(docs[i].createdOn);
                    docs[i].createdOn = co;
                    pages.save(docs[i]);
                } else {
                                        let co = new Date(docs[i].createdOn);
                    docs[i].createdOn = co;
                    pages.save(docs[i]);
                }
            };
        })
    });
    //at this stage only one cms content route
    app.use(cms.handler);
    //get admin features and bolt them onto the app
    require('./lib/admin')(app);
};
{'fraction_non_alphanumeric': 0.1483409238776838, 'fraction_numerical': 0.0006506180871828237, 'mean_word_length': 1.874766355140187, 'pattern_counts': {'":': 0, '<': 4, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6040754', 'n_tokens_mistral': 447, 'n_tokens_neox': 431, 'n_words': 121}