Skip to content

Commit 03acd8f

Browse files
committed
mock authentification added
1 parent b5672df commit 03acd8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎middleware-exercises/exercise-2/server.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function usernameMiddleware(req, res, next) {
2525
app.post("/", usernameMiddleware, (req, res) => {
2626
const { username, body } = req;
2727
let nameAnswer = ''
28-
if (username){
28+
if (username !== null){
2929
nameAnswer = "You are authenticated as " + username + ".";
3030
} else {
3131
nameAnswer = "You are not authenticated";

0 commit comments

Comments
 (0)