Oauth linking and unlinking controller and route placeholders
This commit is contained in:
2
app.js
2
app.js
@ -58,6 +58,8 @@ app.get('/account', passportConf.isAuthenticated, user.getAccount);
|
|||||||
app.post('/account/profile', passportConf.isAuthenticated, user.postAccountProfile);
|
app.post('/account/profile', passportConf.isAuthenticated, user.postAccountProfile);
|
||||||
app.post('/account/settings', passportConf.isAuthenticated, user.postAccountSettings);
|
app.post('/account/settings', passportConf.isAuthenticated, user.postAccountSettings);
|
||||||
app.post('/account/delete', passportConf.isAuthenticated, user.deleteAccount);
|
app.post('/account/delete', passportConf.isAuthenticated, user.deleteAccount);
|
||||||
|
app.post('/account/link', passportConf.isAuthenticated, user.postOauthLink);
|
||||||
|
app.post('/account/unlink', passportConf.isAuthenticated, user.postOauthUnlink);
|
||||||
|
|
||||||
app.get('/api', api.getApi);
|
app.get('/api', api.getApi);
|
||||||
app.get('/api/foursquare', passportConf.isAuthenticated, passportConf.isAuthorized, api.getFoursquare);
|
app.get('/api/foursquare', passportConf.isAuthenticated, passportConf.isAuthorized, api.getFoursquare);
|
||||||
|
@ -124,10 +124,21 @@ exports.postSignup = function(req, res) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GET /admin
|
* POST /account/link
|
||||||
|
* @param req
|
||||||
|
* @param res
|
||||||
*/
|
*/
|
||||||
exports.getAdmin = function(req, res) {
|
exports.postOauthLink = function(req, res) {
|
||||||
res.send('access granted admin!');
|
console.log('linking oauth2');
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POST /account/unlink
|
||||||
|
* @param req
|
||||||
|
* @param res
|
||||||
|
*/
|
||||||
|
exports.postOauthUnlink = function(req, res) {
|
||||||
|
console.log('unlinking oauth2');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user