{"size": 655, "ext": "js", "max_stars_repo_path": "src/routes/routes.js", "max_stars_repo_name": "ypedroo/contracts-node-api", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/routes/routes.js", "max_issues_repo_name": "ypedroo/contracts-node-api", "max_issues_repo_issues_event_min_datetime": "2020-09-28T10:38:09.000Z", "max_issues_repo_issues_event_max_datetime": "2020-09-28T10:38:09.000Z", "max_forks_repo_path": "src/routes/routes.js", "max_forks_repo_name": "ypedroo/contracts-node-api", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 43.6666666667, "max_line_length": 78, "alphanum_fraction": 0.7099236641}
const express = require("express");
const router = express.Router();
const PartController = require("../controllers/PartController");
const { partService } = require("../config/DependencyContainer");

const partController = new PartController(partService);

router.get('/part/:id', (req, res) => partController.getPart(req, res));
router.patch('/part/:id', (req, res) => partController.updatePart(req, res));
router.delete('/part/:id', (req, res) => partController.deletePart(req, res));
router.get('/part', (req, res) => partController.getParts(req, res));
router.post('/part', (req, res) => partController.register(req, res));

module.exports = router;
