jaredhanson / jaredhanson/connect-flash
Success & Error Flashes
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
On a particular page, I want to have a flash for both success and error messages. However, I cannot figure out how to determine which is which in the view template:
```
request.flash('success', message);
request.flash('error', message);
```
How to access the message in the view: `<%= message %>`
```
if(message.error) {
// Show error state
} else if(message.success) {
// Show success state
}
```
But I'm not seeing any way to do this? Is this possible?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue mentions request.flash and accessing a message from a view template, but it names no repository files, tests, or entry points. Start by locating the flash API and its view-facing usage, then verify and document how success and error messages are distinguished in a template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100