added /home so in dev can easily see home page when logged in

This commit is contained in:
Henry Oswald 2014-07-28 17:04:17 +01:00
parent c5b72f5f8b
commit 2267a484f4
2 changed files with 9 additions and 1 deletions

View file

@ -22,6 +22,14 @@ module.exports = HomeController =
else
res.redirect "/login"
home: (req, res)->
if homepageExists
res.render 'external/home',
title: 'ShareLaTeX.com'
else
res.redirect "/login"
externalPage: (page, title) ->
return (req, res, next = (error) ->) ->
path = Path.resolve(__dirname + "/../../../views/external/#{page}.jade")

View file

@ -3,7 +3,7 @@ HomeController = require('./HomeController')
module.exports =
apply: (app) ->
app.get '/', HomeController.index
app.get '/home', HomeController.index
app.get '/home', HomeController.home
app.get '/tos', HomeController.externalPage("tos", "Terms of Service")
app.get '/about', HomeController.externalPage("about", "About Us")