const express = require('express');
const invoiceController = require('../controllers/invoice.controller');
const { requireAuth } = require('../middleware/auth');

const router = express.Router();
router.get('/', requireAuth, invoiceController.list);
router.get('/create', requireAuth, invoiceController.createForm);
router.post('/', requireAuth, invoiceController.store);
router.get('/:id', requireAuth, invoiceController.view);
router.get('/:id/print', requireAuth, invoiceController.print);
router.post('/:id/cancel', requireAuth, invoiceController.cancel);
module.exports = router;
