initial login and register routes

This commit is contained in:
psychobunny
2014-02-27 16:52:46 -05:00
parent e193d58112
commit dae7b06f4d
3 changed files with 73 additions and 54 deletions

View File

@@ -589,8 +589,8 @@ process.on('uncaughtException', function(err) {
// Basic Routes (entirely client-side parsed, goal is to move the rest of the crap in this file into this one section)
(function () {
var routes = ['login', 'register', 'account', '403', '404', '500'],
loginRequired = ['unread', 'notifications'];
var routes = ['register', 'account', '403', '404', '500'],
loginRequired = ['notifications'];
async.each(routes.concat(loginRequired), function(route, next) {
app.get('/' + route, function (req, res) {
@@ -620,6 +620,12 @@ process.on('uncaughtException', function(err) {
app.get('/', app.buildHeader, controllers.home);
app.get('/api/home', app.prepareAPI, controllers.home);
app.get('/login', app.buildHeader, controllers.login);
app.get('/api/login', app.prepareAPI, controllers.login);
app.get('/register', app.buildHeader, controllers.register);
app.get('/api/register', app.prepareAPI, controllers.register);
app.get('/topic/:topic_id/:slug?', app.buildHeader, controllers.topics.get);
app.get('/api/topic/:topic_id/:slug?', app.prepareAPI, controllers.topics.get);