diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-02-24 15:47:07 -0500 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-02-24 15:47:07 -0500 |
commit | b441bb2b67f10ae1b83363d158a0ac1591f63e51 (patch) | |
tree | 8bc624059233d71095c896c3ebf776e28fa2cfc6 /src/server/authentication/controllers/user.ts | |
parent | 28fc26cec5faa0ac1f70a37aa6a23d6cb2d61f03 (diff) |
rough ui finished
Diffstat (limited to 'src/server/authentication/controllers/user.ts')
-rw-r--r-- | src/server/authentication/controllers/user.ts | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/server/authentication/controllers/user.ts b/src/server/authentication/controllers/user.ts index 72fdd5137..554781409 100644 --- a/src/server/authentication/controllers/user.ts +++ b/src/server/authentication/controllers/user.ts @@ -5,7 +5,6 @@ import { IVerifyOptions } from "passport-local"; import "../config/passport"; import * as request from "express-validator"; const flash = require("express-flash"); -import * as path from 'path' import * as session from "express-session"; import * as pug from 'pug'; @@ -18,17 +17,6 @@ export let getEntry = (req: Request, res: Response) => { res.redirect("/login"); } -export let getHome = (req: Request, res: Response) => { - // if user is not logged in, redirect to log in page - if (!req.user) { - res.redirect("/login"); - return; - } - // otherwise, connect them to Dash - // TODO: store and manage users' workspaces - res.sendFile(path.join(__dirname, '../../deploy/index.html')); -} - /** * GET /signup * Directs user to the signup page @@ -38,7 +26,7 @@ export let getSignup = (req: Request, res: Response) => { if (req.user) { let user = req.user; console.log(user); - return res.redirect("/"); + return res.redirect("/home"); } res.render("signup.pug", { title: "Sign Up" @@ -104,7 +92,7 @@ export let postSignup = (req: Request, res: Response, next: NextFunction) => { */ export let getLogin = (req: Request, res: Response) => { if (req.user) { - return res.redirect("/"); + return res.redirect("/home"); } res.render("login.pug", { title: "Log In" |