Last active
February 8, 2022 16:34
-
-
Save gumbarros/557ee856f9fb3323a1b7df00766a4f72 to your computer and use it in GitHub Desktop.
Router Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.route("/products/:id?") | |
.get( (request, response) => ProductController.getProductById(request, response)) | |
.post( (request,response) => ProductController.newProduct(request, response)) | |
.patch( async (request, response) => await ProductController.updateProductById(request, response)) | |
.delete( (request, response) => ProductController.deleteProductById(request, response)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment