<commit_before>/**
* @file Route handler for router.get('/users')
*/
const { Post } = require('../models');

module.exports = (req, res) => {
  Post.findAll()
    .then(postsArray => res.status(200).send({ posts: postsArray }))
    .catch(err => res.json({ message: err }));
};<commit_msg>change: (data) have find post handlers send raw data without reformatting. Move the data cleaning to the client side<commit_after>/**
* @file Route handler for router.get('/users')
*/
const { Post, User } = require('../models');

module.exports = (req, res) => {
  Post.findAll({ include: [User] })
    .then(postsArray => res.status(200).send({ errors: {}, posts: postsArray }))
    .catch(error => res.json({ errors: error, posts: null }));
};
{'fraction_non_alphanumeric': 0.2016348773841962, 'fraction_numerical': 0.008174386920980926, 'mean_word_length': 4.104166666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1540118', 'n_tokens_mistral': 232, 'n_tokens_neox': 229, 'n_words': 66}