<commit_before>var User = require('../models/usersModel');

module.exports = {
  createUser: function(user, callback) {
    console.log('controller', user);
    var newUser = new User({
      scId: user.id.toString(),
      scUsername: user.username,
      scUri: user.uri,
      scPermalink: user.permalink_url,
      scAvatarUri: user.avatar_url,
      first_name: user.first_name,
      last_name: user.last_name,
      full_name: user.full_name,
      scDesc: user.description,
      website: user.website,
      websiteTitle: user.website_title,
    });
    newUser.save(function(err, doc) {
      if (err) {
          throw err;
      }
      else {
        console.log(typeof callback);
        callback(doc);
      }<commit_msg>first pass at creating new users<commit_after>var User = require('../models/usersModel');

module.exports = {
  createUser: function(user, callback) {
    console.log('controller', user);
    var newUser = new User({
      scId: user.id.toString(),
      scUsername: user.username,
      scUri: user.uri,
      scPermalink: user.permalink_url,
      scAvatarUri: user.avatar_url,
      first_name: user.first_name,
      last_name: user.last_name,
      full_name: user.full_name,
      scDesc: user.description,
      website: user.website,
      websiteTitle: user.website_title,
    });
    newUser.save(function(err, doc) {
      if (err) {
          throw err;
      }
      else {
        callback(doc);
      }
{'fraction_non_alphanumeric': 0.12112869924294563, 'fraction_numerical': 0.0, 'mean_word_length': 2.503614457831325, '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': '5991492', 'n_tokens_mistral': 467, 'n_tokens_neox': 461, 'n_words': 93}