const express = require('express');
const router = express.Router();

const accountRoutes = require('./accounts/accounts');
const ticketRoutes = require('./tickets/tickets');
const { conventionAuth } = require('../../middlewares');
const { scan, list, claimFoodStub, getEvents, updateSelf } = require('../../controllers/conventions/events');
const { allMembers } = require('../../controllers/members/accounts');

router.use('/accounts', accountRoutes);
router.use('/tickets', ticketRoutes);
router.post('/scan', conventionAuth, scan);
router.get('/list', conventionAuth, list);
router.post('/food-stab/:id', conventionAuth, claimFoodStub);
router.get('/members', conventionAuth, allMembers);

router.get('/test/events', conventionAuth, getEvents);
router.patch('/test/self', conventionAuth, updateSelf);
module.exports = router;
