{"size": 717, "ext": "js", "max_stars_repo_path": "src/routes/api.js", "max_stars_repo_name": "axelmanzanilla/grupo_10_tecnoshop", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/routes/api.js", "max_issues_repo_name": "axelmanzanilla/grupo_10_tecnoshop", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/routes/api.js", "max_forks_repo_name": "axelmanzanilla/grupo_10_tecnoshop", "max_forks_repo_forks_event_min_datetime": "2021-05-26T10:03:21.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-17T15:23:26.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 47.8, "max_line_length": 86, "alphanum_fraction": 0.7894002789}
const express = require('express');
const router = express.Router();
const apiController = require ('../controllers/apiController');
const validateProductMiddleware = require('../middlewares/validateProductMiddleware');

router.get('/users', apiController.getAllUsers);
router.get('/users/:id', apiController.getUser);
router.get('/products', apiController.getAllProducts);
router.get('/products/:id', apiController.getProduct);
router.post('/products', validateProductMiddleware, apiController.createProduct);
router.put('/products', validateProductMiddleware, apiController.updateProduct);
router.delete('/products', apiController.deleteProduct);
router.get('/sales', apiController.sales);

module.exports = router;