{"size": 332, "ext": "js", "max_stars_repo_path": "server/database/queries/get_session_responses_number.js", "max_stars_repo_name": "marwajomaa/connect5", "max_stars_repo_stars_event_min_datetime": "2018-12-23T23:32:03.000Z", "max_stars_repo_stars_event_max_datetime": "2018-12-23T23:32:03.000Z", "max_issues_repo_path": "server/database/queries/get_session_responses_number.js", "max_issues_repo_name": "marwajomaa/connect5", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server/database/queries/get_session_responses_number.js", "max_forks_repo_name": "marwajomaa/connect5", "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": 33.2, "max_line_length": 95, "alphanum_fraction": 0.7018072289}
const Response = require("../models/Response");

const getSessionResponsesNumber = (sessionId, surveyType) => new Promise((resolve, reject) => {
  Response.count({ session: sessionId, surveyType })
    .then(reponsesNumber => {
      resolve({ reponsesNumber })})
    .catch(reject);
});
module.exports = getSessionResponsesNumber;
