{"size": 369, "ext": "js", "max_stars_repo_path": "src/routes/del.js", "max_stars_repo_name": "smf-distribution/heroku-redis-api", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/routes/del.js", "max_issues_repo_name": "smf-distribution/heroku-redis-api", "max_issues_repo_issues_event_min_datetime": "2020-12-01T12:50:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-21T08:44:49.000Z", "max_forks_repo_path": "src/routes/del.js", "max_forks_repo_name": "smf-distribution/heroku-redis-api", "max_forks_repo_forks_event_min_datetime": "2020-12-03T12:03:19.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-03T12:03:19.000Z"}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 21.7058823529, "max_line_length": 61, "alphanum_fraction": 0.5067750678}
'use strict';

module.exports = (app, redisClient, logger) => {

  app.post('/del', async (req, res) => {
    try {
      const
        keys = req.body.keys || '',
        keysArr = keys.split(','),
        result = await redisClient.delAsync(...keysArr) || 0;
      res.send({ result: (result > 0) });
    } catch (err) {
      logger.error(err.stack);
    }
  });
};
