<commit_before>var url = require('url');

exports.index = function (req, res) {
    var page = helpers.pages.getPageNumber(req);
    var offset = page !== 0 ? page - 1 : 0;
    var pageSize = helpers.pages.PAGE_SIZE;
    var testQuery = 'select * from Photoes';
    var query = 'select P.*, U.fullName from Photoes as P inner join userFeedItems as F on P.id=F.PhotoId ';
    query += 'inner join Users as U on P.userID=U.id ';
    query += 'where F.UserId=';
    query += req.session.login.id || -1;
    query += ' order by P.createdAt DESC';
    query += ' limit ' + pageSize + ' offset ' + offset * pageSize;
    console.log(query);
    sequelize.query(query)
        .complete(function (err, photos) {
            console.log(photos.length);
            if (err) {
                console.log('error: ' + err);
                return;
            }
            if (!photos) {
                // no photos in list
                console.log('Empty list');
                return;
            }
            var options = {
                title: 'Feed',
                photos: photos,
                prevPage: page != 1 ? page - 1 : 1,
                nextPage: page + 1,
                isDone: photos.length < pageSize
            };
            res.render('feed', options);
        });
};<commit_msg>Remove un-needed console logs<commit_after>var url = require('url');

exports.index = function (req, res) {
    var page = helpers.pages.getPageNumber(req);
    var offset = page !== 0 ? page - 1 : 0;
    var pageSize = helpers.pages.PAGE_SIZE;
    var testQuery = 'select * from Photoes';
    var query = 'select P.*, U.fullName from Photoes as P inner join userFeedItems as F on P.id=F.PhotoId ';
    query += 'inner join Users as U on P.userID=U.id ';
    query += 'where F.UserId=';
    query += req.session.login.id || -1;
    query += ' order by P.createdAt DESC';
    query += ' limit ' + pageSize + ' offset ' + offset * pageSize;

    sequelize.query(query)
        .complete(function (err, photos) {
            if (err) {
                console.log('error: ' + err);
                return;
            }
            if (!photos) {
                // no photos in list
                return;
            }
            var options = {
                title: 'Feed',
                photos: photos,
                prevPage: page != 1 ? page - 1 : 1,
                nextPage: page + 1,
                isDone: photos.length < pageSize
            };
            res.render('feed', options);
        });
};
{'fraction_non_alphanumeric': 0.12916006339144215, 'fraction_numerical': 0.006339144215530904, 'mean_word_length': 1.5870901639344261, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3571792', 'n_tokens_mistral': 763, 'n_tokens_neox': 724, 'n_words': 211}