Commit 2cc341de authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Attempts at getting the save function to work

- These don't work yet, in fact I think the site might be broken by this.
  However, I'm commiting to get this moved over to my primary dev machine.
parent b2a2a2d9
......@@ -13,16 +13,16 @@ var schools = [
]
/* GET Schools listing. */
router.get('/lists/schools', function(req, res, next) {
router.get('/api/lists/schools', function(req, res, next) {
res.send(JSON.stringify(schools));
});
// GET ical file
router.get('/ical/:year/:season/:crns', function(req, res) {
router.get('/api/:format/:school/:semester/:crns', function(req, res) {
var crns = req.params['crns'].split(',');
var format = req.params['format'];
var year = req.params['year'];
var season = req.params['season'];
var school = req.params['school'];
var semester = req.params['semester'];
var crnNums = [{
format,
year,
......
var express = require('express');
var router = express.Router();
// Load site wide configurations
var config = require('../config');
......@@ -7,9 +8,28 @@ router.get('/docs', function(req, res, next) {
res.render('docs', { config });
})
// TODO: Actually learn how to make this function set be passed around properly
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { config });
});
router.get('/:school/:semester/:crns'), function(req, res, next) {
var crns = req.params['crns'].split(',');
}
router.get('/:school/:semester'), function(req, res, next) {
var semester = req.params['semester'];
next();
}
router.get('/:school'), function(req, res, next) {
var school = req.params['school'];
next();
}
router.get('/'), function(req, res, next) {
var save = {
}
render('index', { config });
}
module.exports = router;
......@@ -22,7 +22,7 @@ block content
div.input-group
span.input-group-btn
button.btn.btn-info(type="button") Import CRN's
input.form-control(type="text" placeholder="Enter class CRN's separated by commas...")
input.form-control(type="text" placeholder="Enter CRN's separated by commas...")
// br
// div.input-group
// span.input-group-btn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment