<commit_before>const snapshotRepository = require('../../../lib/infrastructure/repositories/snapshot-repository');

module.exports = {
  create(snapshot) {
    const snapshotRaw = {
      organizationId: snapshot.organizationId,
      userId: snapshot.profile.data.id,
      score: snapshot.profile.data.attributes['total-pix-score'],
      profile: JSON.stringify(snapshot.profile)
    };

    return snapshotRepository
      .save(snapshotRaw)
      .then((snapshot) => {
        return snapshot.get('id');
      });
    //.catch(err => err);

  }
};<commit_msg>refacto snapshot service, delete comments and  use fatarrow<commit_after>const snapshotRepository = require('../../../lib/infrastructure/repositories/snapshot-repository');

module.exports = {
  create(snapshot) {
    const snapshotRaw = {
      organizationId: snapshot.organizationId,
      userId: snapshot.profile.data.id,
      score: snapshot.profile.data.attributes['total-pix-score'],
      profile: JSON.stringify(snapshot.profile)
    };

    return snapshotRepository
      .save(snapshotRaw)
      .then((snapshot) => snapshot.get('id'));
  }
};
{'fraction_non_alphanumeric': 0.14451382694023193, 'fraction_numerical': 0.0, 'mean_word_length': 3.332046332046332, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '922398', 'n_tokens_mistral': 309, 'n_tokens_neox': 313, 'n_words': 50}