Help in Advanced Node and Express - Create New Middleware

Hello, I am not sure whats wrong, it works just fine as expected

here

its properly redirect to the home if you are not logged in
but i dont get the second test to pass it shows:

An attempt to go to the profile at this point should redirect to the homepage since we are not logged in

6 Likes

in the ‘/’ route, changing {title: ‘Hello’, message: ‘Please login’, showLogin: true} to {title: ‘Home Page’, message: ‘Please login’, showLogin: true} worked for me

13 Likes

Ohhhhhhhh, thank you

Thanks tarik-ali,

How did you find the solution?

Thanks, changing the title string made the test pass.
I tried to add your solution (with credits, of course) to the hints, but unfortunately the repository is now read-only and doesn’t accept pull request.

This worked for me too.

Give me some advice on this: https://learn.freecodecamp.org/information-security-and-quality-assurance/advanced-node-and-express/create-new-middleware/