{"size": 609, "ext": "js", "max_stars_repo_path": "backend/routes/teams.js", "max_stars_repo_name": "diegoauron/Sportsbud", "max_stars_repo_stars_event_min_datetime": "2020-04-22T17:56:58.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-22T17:56:58.000Z", "max_issues_repo_path": "backend/routes/teams.js", "max_issues_repo_name": "diegoauron/Sportsbud", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "backend/routes/teams.js", "max_forks_repo_name": "diegoauron/Sportsbud", "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": 25.375, "max_line_length": 61, "alphanum_fraction": 0.73727422}
const express = require('express');

const TeamsController = require('../Controllers/teams')

const checkAuth = require("../middleware/check-auth");

const router = express.Router();

// Creating a new Team
router.post("", checkAuth, TeamsController.createTeams);

// Updating a team
router.put("/:id", checkAuth, TeamsController.updateTeam);

// Getting all teams around user's location
router.get('', TeamsController.getTeams);

// Getting a single Team
router.get("/:id", TeamsController.getTeam );
 // Deleting teams
router.delete("/:id", checkAuth, TeamsController.deleteTeam);

module.exports = router;
