const express = require('express');
const { sendConcern, getMemberConcerns, getConcernDetails } = require('../../controllers/members/concerns');
const { memberAuth, validation } = require('../../middlewares');
const { body } = require('express-validator');

const router = express.Router();

router.post('/', memberAuth, [body('message').notEmpty(), body('type').notEmpty()], validation, sendConcern);
router.get('/', memberAuth, getMemberConcerns);
router.get('/:type', memberAuth, getConcernDetails);

module.exports = router;
