<commit_before>module.exports = (api) => {
  const client = api.client;
  const q = client.queries;

  const addInterest = (keyspace, user, type, keyword, next) => {
    const interestValues = [user, type, keyword];
    client.execute(q(keyspace, 'upsertInterest'), interestValues, {}, (err) => {
      if (err) { return next(err); }
      next(null, { user, type, keyword });
    });
  };

  const getUsers = (keyspace, type, keyword, next) => {
    api.common.get(keyspace, 'selectUsersByInterest', [type, keyword], 'many', (err, results) => {
      if (err) { return next(err); }
      if (!results) { return next(api.common.error(404, `Unable to find users by interest: ${type}:${keyword}`)); }
      next(null, results);
    });
  };

  return {
    addInterest,
    getUsers,
  };<commit_msg>use client.execute for getUsers in Interests<commit_after>module.exports = (api) => {
  const client = api.client;
  const q = client.queries;

  const addInterest = (keyspace, user, type, keyword, next) => {
    const interestValues = [user, type, keyword];
    client.execute(q(keyspace, 'upsertInterest'), interestValues, {}, (err) => {
      if (err) { return next(err); }
      next(null, { user, type, keyword });
    });
  };

  const getUsers = (keyspace, type, keyword, next) => {
    client.execute(q(keyspace, 'selectUsersByInterest'), [type, keyword], {}, (err, results) => {
      if (err) { return next(err); }
      next(null, results);
    });
  };

  return {
    addInterest,
    getUsers,
  };
{'fraction_non_alphanumeric': 0.1741721854304636, 'fraction_numerical': 0.001986754966887417, 'mean_word_length': 3.3797101449275364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '75272', 'n_tokens_mistral': 498, 'n_tokens_neox': 481, 'n_words': 123}