const express = require('express');
const { memberAuth, validation } = require('../../middlewares');
const { body } = require('express-validator');
const { linkTicket, getLinkedTickets, getTickets } = require('../../controllers/members/tickets');
const router = express.Router();

router.get('/', memberAuth, getTickets);

router.post('/link', [body('ticketNo').notEmpty(), validation], memberAuth, linkTicket);
router.get('/link', memberAuth, getLinkedTickets);

module.exports = router;
