Untitled
unknown
plain_text
2 years ago
586 B
13
Indexable
// CAMINHO: BACKEND/SRC/ROUTES/products.router.js
const express = require('express');
const productsController = require('../controllers/products.controller');
const router = express.Router();
router.use(express.json());
router.get('/products', productsController.getAllController);
router.get('/products/:id', productsController.getByIdController);
router.post('/products', productsController.insertNewProduct);
router.put('/products/:id', productsController.updateProductName);
router.delete('/products/:id', productsController.deleteProductController);
module.exports = router;Editor is loading...
Leave a Comment