Skip to content

Instantly share code, notes, and snippets.

@MeoBeoI
Last active January 30, 2016 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MeoBeoI/1785c19ed0c27b2633c4 to your computer and use it in GitHub Desktop.
Save MeoBeoI/1785c19ed0c27b2633c4 to your computer and use it in GitHub Desktop.
// Check companyAccessToken
var jwtAuth = require('../../../libs/jwt-auth')(myApp);
router.all('/*' , jwtAuth.companyAuth);
// Company -> Product API
router.get ('/:companyId/products/:productId' , productApi.getProductDetail);
router.post ('/:companyId/products' , productApi.createProduct);
router.put ('/:companyId/products/:productId' , productApi.updateProduct);
router.delete('/:companyId/products/:productId' , productApi.deleteProduct);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment