-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathroutes.js
19 lines (16 loc) · 889 Bytes
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var routes = require('./handlers');
var learningObjectives = require('./handlers/learningObjectives');
var students = require('./handlers/students');
module.exports = function(app, apiContext) {
app.get('/', routes.index);
app.get(apiContext + 'learningObjectives', learningObjectives.list);
app.post(apiContext + 'learningObjectives', learningObjectives.create);
app.get(apiContext + 'learningObjectives/:id', learningObjectives.show);
app.delete(apiContext + 'learningObjectives/:id', learningObjectives.destroy);
app.put(apiContext + 'learningObjectives/:id', learningObjectives.update);
app.get(apiContext + 'students', students.list);
app.post(apiContext + 'students', students.create);
app.get(apiContext + 'students/:id', students.show);
app.delete(apiContext + 'students/:id', students.destroy);
app.put(apiContext + 'students/:id', students.update);
};