jaredhanson / jaredhanson/connect-flash

Node.js req.flash issues

Open
#52 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
173
PR merge metrics
No merged PRs in 30d

Description

I'm having issues in returning messages with req.flash()
I'm trying to return a string message to the view instead it's flashing 1.
This is the short code:
return res.render('index', {
error_msg: req.flash('error_msg', 'Not found'),
success_msg: ''
})

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the req.flash() call shown in the issue and compare how messages are added with how they are retrieved before res.render(). Confirm what value the view receives and define done as rendering the requested flash message rather than the numeric value shown in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.