Parent: [74c62d] (diff)

Child: [38b632] (diff)

Download this file

routes.js    27 lines (21 with data), 1.4 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
/*made by Miguel Rodrigues @ KBZ miguel.rodrigues@knowledgebiz.pt*/
//BackEnd Routes
var constants = require('../constants.js');
var controllerV0 = require('../controllers/controllerV0');
module.exports = function(app) {
// server routes ===========================================================
//v0 routes
app.post('/api/vf-os-enabler/v0/register', controllerV0.registerVapp);
app.post('/api/vf-os-enabler/v0/notifications', controllerV0.createNotifications);
app.post('/api/vf-os-enabler/v0/notification/rules/', controllerV0.createNotificationsRules);
app.post('/api/vf-os-enabler/v0/createApp/', controllerV0.createApp);
//app.get('/:token/getNotifications', function(req, res, next){console.log("PASSASTE com o token: " + req.params.token); next();}, controller.getNotifications);
app.delete('/api/vf-os-enabler/v0/delete/:appid', controllerV0.deleteVapp);
app.delete('/api/vf-os-enabler/v0/deleteRule/:rulesid', controllerV0.deleteRule);
app.get('/api/vf-os-enabler/v0/getRules/:appid', controllerV0.getRules);
app.get('/api/vf-os-enabler/v0/getNotifications/:appid', controllerV0.getNotifications);
app.get('/api/vf-os-enabler/v0/getApps/:developerid', controllerV0.getApps);
app.get('*', function(req, res) {
res.sendFile('index.html', { root: constants.FRONTEND_PATH + '/public/views/' }); // load our public/index.html file
});
};