Skip to content

Commit 72f5624

Browse files
Rename /restricted to /analytics
1 parent cf67905 commit 72f5624

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ const signUserToken = user =>
108108
);
109109

110110
app.get('/', function(req, res){
111-
res.redirect('/restricted');
111+
res.redirect('/analytics');
112112
});
113113

114-
app.get('/restricted', restrict, function(req, res){
115-
res.send('Wahoo! restricted area, click to <a href="/logout">logout</a>');
114+
app.get('/analytics', restrict, function(req, res){
115+
res.send('Restricted area, click to <a href="/logout">logout</a>');
116116
});
117117

118118
app.get('/logout', function(req, res){
@@ -142,7 +142,7 @@ app.post('/login', function (req, res, next) {
142142
req.session.success = 'Authenticated as ' + user.firstName + '' + user.lastName
143143
+ ' click to <a href="/logout">logout</a>. '
144144
+ ' Redirecting to ' + returnTo + '.';
145-
res.redirect(returnTo || '/restricted');
145+
res.redirect(returnTo || '/analytics');
146146
delete req.session.returnTo;
147147
});
148148
} else {

views/login.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<h1>Login</h1>
55
<%- message %>
6-
Try accessing <a href="/restricted">/restricted</a>, then authenticate with "[email protected]" or "[email protected]" and password "foobar".
6+
Try accessing <a href="/analytics">/analytics</a>, then authenticate with "[email protected]" or "[email protected]" and password "foobar".
77
<form method="post" action="/login">
88
<p>
99
<label for="email">Email:</label>

0 commit comments

Comments
 (0)