Created
November 5, 2018 21:47
-
-
Save maisonm/17b9b3c6f8db0aef20dc0a723881d2ce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const express = require('express'); | |
const router = express.Router(); | |
const customer_controller = require('../controllers/customers'); | |
//Returns all customers belonging to a user | |
router.get('/:userid', customer_controller.customer_get); | |
//Adds customer to the database | |
router.post('/:userid', customer_controller.customer_add); | |
//Updates customer in the database | |
router.put('/:custid', customer_controller.customer_update); | |
//Removes customer fron the database | |
router.delete('/:custid', customer_controller.customer_remove); | |
module.exports = router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment