mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
added /home so in dev can easily see home page when logged in
This commit is contained in:
parent
c5b72f5f8b
commit
2267a484f4
2 changed files with 9 additions and 1 deletions
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue