<commit_before>var mw = {
	formatQuery: require('epiphany/middleware/format-query'),
	paginate: require('epiphany/middleware/paginate')
};

var Employee = require('./model');

module.exports = {
	create: function(req, res, next) {
		Employee.create(req.body, function(err, employee) {
			if(err) return next(err);
			res.status(201).json(employee);
		});
	},

	find: function(req, res, next) {
		var page = Math.max(0, req.query.page) || 0;
		var perPage = Math.max(0, req.query.limit) || res.locals.perPage;

		var query = Employee.find(_.omit(req.query, 'limit', 'sort', 'page'),
			null,
			{ sort: req.query.sort || '-dateCreated', lean: true });
<commit_msg>Fix missing mongoose variable bug.<commit_after>var mw = {
	formatQuery: require('epiphany/middleware/format-query'),
	paginate: require('epiphany/middleware/paginate')
};

var mongoose = require('mongoose');

var Employee = require('./model');

module.exports = {
	create: function(req, res, next) {
		Employee.create(req.body, function(err, employee) {
			if(err) return next(err);
			res.status(201).json(employee);
		});
	},

	find: function(req, res, next) {
		var page = Math.max(0, req.query.page) || 0;
		var perPage = Math.max(0, req.query.limit) || res.locals.perPage;

		var query = Employee.find(_.omit(req.query, 'limit', 'sort', 'page'),
			null,
			{ sort: req.query.sort || '-dateCreated', lean: true });

{'fraction_non_alphanumeric': 0.1856936416184971, 'fraction_numerical': 0.008670520231213872, 'mean_word_length': 4.389105058365759, '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': '6503505', 'n_tokens_mistral': 531, 'n_tokens_neox': 487, 'n_words': 101}