Unverified Commit 395d9d9f authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Add response for ical request

- all dummy returns now
parent b71556b7
...@@ -8,6 +8,7 @@ var express = require('express'); ...@@ -8,6 +8,7 @@ var express = require('express');
var router = express.Router(); var router = express.Router();
var mongoose = require('mongoose'); var mongoose = require('mongoose');
var Semester = require('../../models/Semester'); var Semester = require('../../models/Semester');
var ical = require('ical-generator');
// Load site wide configurations // Load site wide configurations
var config = require('../../config'); var config = require('../../config');
...@@ -45,5 +46,12 @@ router.get('/json/classes/:SEMSLUG', function(req, res, next) { ...@@ -45,5 +46,12 @@ router.get('/json/classes/:SEMSLUG', function(req, res, next) {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// ICAL API Section // ICAL API Section
router.get('/ical/:SCHOOL/:SEMSLUG/:CLASSES', function(req, res, next) {
var schoolSlug = req.params['SCHOOL'];
var semSlug = req.params['SEMSLUG'];
var classes = req.params['CLASSES'];
res.json({school: schoolSlug, sem: semSlug, classes: classes});
})
module.exports = router; module.exports = router;
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