{"size": 558, "ext": "js", "max_stars_repo_path": "routes/repos.js", "max_stars_repo_name": "block-3/Prometheum", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "routes/repos.js", "max_issues_repo_name": "block-3/Prometheum", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "routes/repos.js", "max_forks_repo_name": "block-3/Prometheum", "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": 34.875, "max_line_length": 79, "alphanum_fraction": 0.6792114695}
const express = require('express');
const router = express.Router();
const gitlab = require('../config/gitlab');
const authenticate = require('../middleware/expressJwtAuth');

router.get('/tree/:id', function (req, res) {
  console.log('EST');
  //Initialize Repo in Gitlab
  gitlab.projects.repository.tree(req.params.id, {recursive: true}).then(t => {
    res.status(200).json({success: true, tree:t });
  }).catch(err=>{
    console.log(err);
  });
});
//TODO: All repositories for a given user, all files in a given repository, =
module.exports = router;