Feature: First version of the REST API done

This commit is contained in:
2015-08-14 08:04:31 +00:00
commit e6fc0be0ed
28 changed files with 3170 additions and 0 deletions

13
app/routes/users.js Normal file
View File

@@ -0,0 +1,13 @@
var passport = require('../security/passport'),
UserController = require('../controllers/users');
module.exports = function(app) {
app.post('/api/users/login', passport.local, UserController.login);
app.delete('/api/users/login', UserController.logout);
app.post('/api/users', UserController.subscribe);
app.delete('/api/users', passport.jwt, UserController.unsubscribe);
};