Skip to content

Instantly share code, notes, and snippets.

@maisonm
Created November 5, 2018 21:47
Show Gist options
  • Save maisonm/17b9b3c6f8db0aef20dc0a723881d2ce to your computer and use it in GitHub Desktop.
Save maisonm/17b9b3c6f8db0aef20dc0a723881d2ce to your computer and use it in GitHub Desktop.
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