{"size": 607, "ext": "js", "max_stars_repo_path": "app/routes/question.routes.js", "max_stars_repo_name": "rajendrauppal/iqdb", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/routes/question.routes.js", "max_issues_repo_name": "rajendrauppal/iqdb", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/routes/question.routes.js", "max_forks_repo_name": "rajendrauppal/iqdb", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.3461538462, "max_line_length": 66, "alphanum_fraction": 0.7001647446}
#!/usr/bin/env node

'use strict';

module.exports = (app) => {

  const questions = require('../controllers/question.controller');

  // create a new question
  app.post('/api/v1/questions', questions.create);

  // get all questions
  app.get('/api/v1/questions', questions.findAll);

  // get a single question given questionId
  app.get('/api/v1/questions/:questionId', questions.findOne);

  // update a question given questionId
  app.put('/api/v1/questions/:questionId', questions.update);

  // delete a question given questionId
  app.delete('/api/v1/questions/:questionId', questions.delete);

}

