<commit_before>var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});

router.get('/create-account', function(req, res, next) {
	res.render('create_account');
});

router.post('/create-account', function(req, res, next) {
	console.dir(req.body);
	res.render('account_created');
});

router.get('/attendance', function(req, res, next) {
	if(req.body.login) {
		req.flash('success', {
			msg: 'Good job!'
		});
		req.body.login = false;
	} else {
		res.render('attendance');
	}
});

router.post('/attendance', function(req, res, next) {
	console.log(req.body.card);

});

router.get('/login', function(req, res, next) {
	res.render('login');
});

function verifyCard(card) {
	//if card in db, sign in
	//otherwise throw err
}

module.exports = router;<commit_msg>ROUTES: update attendance routes, add post-attendance route after sign-in, add meetings url to view meetings, meeting-create to create meetings, and meeting to view an individual meeting<commit_after>var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});

router.get('/create-account', function(req, res, next) {
	res.render('create_account');
});

router.post('/create-account', function(req, res, next) {
	console.dir(req.body);
	res.render('account_created');
});

router.get('/attendance', function(req, res, next) {
	res.render('attendance');
});

router.post('/attendance', function(req, res, next) {
	console.log(req.body.card);
	res.redirect('/post-attendance');
});

router.get('/post-attendance', function(req, res, next) {
	console.log(req.body.card);
	res.render('post-attendance', {
		cardExists: verifyCard(req.body.card)
	});
});

router.get('/meetings', function(req, res, next) {
	res.render('meetings');
});

router.get('meeting', function(req, res, next) {
	res.render('meeting');
});

router.get('/meeting-create', function(req, res, next) {
	res.render('meeting_create');
});

router.post('/meeting-create', function(req, res, next) {
	console.log(req.body.date);
	res.render('meeting_post_create');
});

router.get('/login', function(req, res, next) {
	res.render('login');
});

function verifyCard(card) {
	//if user exists, add to meeting
	// check to ensure only once per meeting per person
	// otherwise throw err
	return true;
}

function saveMeeting(meetingDate) {
	//create meeting in db
}

module.exports = router;
{'fraction_non_alphanumeric': 0.19623971797884843, 'fraction_numerical': 0.0, 'mean_word_length': 4.9257540603248255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4576762', 'n_tokens_mistral': 866, 'n_tokens_neox': 864, 'n_words': 189}