Created
September 12, 2016 16:11
-
-
Save unicodeveloper/c01d8d264b138d47a4f6f22c53692f48 to your computer and use it in GitHub Desktop.
Cloudinary Blog Post - Part 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var User = require('./controllers/user.server.controller'), | |
token = require('../config/token'); | |
module.exports = function(app) { | |
app.get('/api', token.ensureAuthenticated, User.welcome); | |
app.post('/api/login', User.authenticate); | |
app.post('/api/register', User.registerUser); | |
app.get('/api/me', token.ensureAuthenticated, User.getLoggedInUserDetail); | |
app.put('/api/me', token.ensureAuthenticated, User.updateLoggedInUserDetail); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment