{"size": 312, "ext": "js", "max_stars_repo_path": "src/helpers/selectCorrectIDtype.js", "max_stars_repo_name": "aam-git/feathers-extend-auth", "max_stars_repo_stars_event_min_datetime": "2021-02-17T19:02:01.000Z", "max_stars_repo_stars_event_max_datetime": "2021-02-17T19:02:01.000Z", "max_issues_repo_path": "src/helpers/selectCorrectIDtype.js", "max_issues_repo_name": "aam-git/feathers-extend-auth", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/helpers/selectCorrectIDtype.js", "max_forks_repo_name": "aam-git/feathers-extend-auth", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.2857142857, "max_line_length": 49, "alphanum_fraction": 0.6506410256}
// eslint-disable-next-line no-unused-vars
module.exports = (model, data) => {
  //standard search for mysql etc
  let userID = data.id;

  //switch to mongodb ids
  if (model.options.id === '_id') {
    const ObjectID = require('mongodb').ObjectID;
    userID = new ObjectID(data._id);
  }

  return userID;
};
