const express = require('express')

const router = express.Router()

const {protect} =require('../middleware/auth')
const {addborrow,getborrow,getborrowed,getreturned,returnborrow} = require('../controllers/borrowController')

router.use(protect)

router.post('/addborrow',addborrow)
router.get('/getborrow',getborrow)
router.get('/getborrowed',getborrowed)
router.get('/getreturned',getreturned)
router.put('/returnborrow/:id',returnborrow)

module.exports =router
