const express = require("express")
const router = express.Router()
const { protect } = require('../middleware/auth');
const{addproduct,getproduct,getproductbyid,deleteproduct,updateproduct} = require('../controllers/productController')

router.use(protect)

router.post('/addproduct',addproduct)
router.get('/getproduct',getproduct)
router.get('/getproductbyid/:id',getproductbyid)
router.delete('/deleteproduct/:id',deleteproduct)
router.put('/updateproduct/:id',updateproduct)


module.exports = router