<commit_before>'use strict';

/**
 * A set of functions called "actions" for `ContentManager`
 */

module.exports = {

  models: async(ctx) => {
    ctx.body = strapi.models;
  },

  find: async(ctx) => {
    const model = ctx.params.model;

    const {
      limit = 10,
      skip = 0,
      sort = '_id'
    } = ctx.request.query;

    const entries = await User
      .find()
      .limit(limit)
      .sort(sort)
      .limit(skip);

    ctx.body = entries;
  },

  count: async(ctx) => {
    const model = ctx.params.model;

    const count = await User
      .count();

    ctx.body = {
      count: Number(count)
    };
  },

  findOne: async(ctx) => {
    const model = ctx.params.model;
    const _id = ctx.params._id;

    const entries = await User
      .find({
        id
      });

    ctx.body = entries;
  },

  update: async(ctx) => {
    const entryUpdated = await User
      .update({_id: ctx.request.params.id}, ctx.request.body);

    ctx.body = entryUpdated;
  },

  delete: async(ctx) => {
    const entryDeleted = await User
      .remove({_id: ctx.request.params.id});

    ctx.body = entryDeleted;
  }
};
<commit_msg>Fix find function in content manager controller<commit_after>'use strict';

/**
 * A set of functions called "actions" for `ContentManager`
 */

module.exports = {

  models: async(ctx) => {
    ctx.body = strapi.models;
  },

  find: async(ctx) => {
    const model = ctx.params.model;

    const {
      limit = 10,
      skip = 0,
      sort = '_id'
    } = ctx.request.query;

    const entries = await User
      .find()
      .limit(Number(limit))
      .sort(sort)
      .skip(Number(skip));

    ctx.body = entries;
  },

  count: async(ctx) => {
    const model = ctx.params.model;

    const count = await User
      .count();

    ctx.body = {
      count: Number(count)
    };
  },

  findOne: async(ctx) => {
    const model = ctx.params.model;
    const _id = ctx.params._id;

    const entries = await User
      .find({
        id
      });

    ctx.body = entries;
  },

  update: async(ctx) => {
    const entryUpdated = await User
      .update({_id: ctx.request.params.id}, ctx.request.body);

    ctx.body = entryUpdated;
  },

  delete: async(ctx) => {
    const entryDeleted = await User
      .remove({_id: ctx.request.params.id});

    ctx.body = entryDeleted;
  }
};

{'fraction_non_alphanumeric': 0.14890885750962773, 'fraction_numerical': 0.0025673940949935813, 'mean_word_length': 2.104913678618858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '375910', 'n_tokens_mistral': 803, 'n_tokens_neox': 770, 'n_words': 182}