-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.js
More file actions
28 lines (24 loc) · 1.03 KB
/
routes.js
File metadata and controls
28 lines (24 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var index = require('./controllers/index'),
dependencies = require('./controllers/dependencies'),
people = require('./controllers/people'),
events = require('./controllers/events');
module.exports = function (app, models) {
//Akhá se declaran todas las rutas ;) ;)
var indexController = index(models),
dependenciesController = dependencies(models),
peopleController = people(models),
eventController = events(models);
app.get('/', indexController.mainPage);
//Deps
app.get('/dependencyNames', dependenciesController.getDependencyNames);
app.get('/dependencies', dependenciesController.getDependecies);
app.get('/dependency', dependenciesController.getDependecy);
//People
app.get('/filter', peopleController.getFilters);
app.get('/people', peopleController.getPeople);
app.get('/peopleByFilter', peopleController.getPeopleByFilter);
app.post('/addPerson', peopleController.addPerson);
app.post('/updatePersonAssist', peopleController.updatePersonAssist);
//Events
app.get('/eventFields', eventController.getEventFields);
}