<commit_before>'use strict';

/**
 * Module dependencies.
 */
var path = require('path'),
  mongoose = require('mongoose'),
  Project = mongoose.model('Project'),
  errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));


// Reference modules/articles/server for examples on what can go here
exports.create = function(req, res) {
  var project = new Projects(req.body);


    exports.create = function (req, res) {
        var project = new Project(req.body);
        project.user = req.user;

        project.save(function (err) {
            if (err) {
                return res.status(400).send({
                    message: errorHandler.getErrorMessage(err)
                });
            } else {
                res.json(project);
            }
        });
    };
};<commit_msg>stashing<commit_after>'use strict';

/**
 * Module dependencies.
 */
var path = require('path'),
  mongoose = require('mongoose'),
  Project = mongoose.model('Project'),
  errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));


// Reference modules/articles/server for examples on what can go here
exports.create = function(req, res) {
  var project = new Projects(req.body);


    exports.create = function (req, res) {
        var project = new Project(req.body);
        project.user = req.user;

        project.save(function (err) {
            if (err) {
                return res.status(400).send({
                    message: errorHandler.getErrorMessage(err)
                });
            } else {
                res.json(project);
            }
        });
    };
exports.category = function (req, res) {
  var project = req.project;

  // project.title = req.body.title;
  // project.details = req.body.details;
  project.category = req.body.category;

  project.save(function (err) {
    if (err) {
      return res.status(400).send({
        message: errorHandler.getErrorMessage(err)
      });
    } else {
      res.json(project);
    }
        });
    };
};
{'fraction_non_alphanumeric': 0.14056420233463035, 'fraction_numerical': 0.004377431906614786, 'mean_word_length': 2.20404984423676, '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': '6889060', 'n_tokens_mistral': 596, 'n_tokens_neox': 573, 'n_words': 121}