Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
586 B
8
Indexable
Never
//  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;
Leave a Comment