-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Current status:
most of the flash messages are not working.
including some weird configurations with:
flash.type = 'Error!'
flash.class = 'alert-danger'
flash.messages = [{ msg: 'The invitation link is wrong or truncated. Key informations are missing.' }]
const buff = Buffer.from(JSON.stringify(flash))
const data = buff.toString('base64')
return res.redirect('/clans?flash=' + data)there is an old flash implementation https://github.com/jaredhanson/connect-flash, but this is 10 years old and actually not used in the code, we start it with:
#AppKernel
this.expressApp.use(flash())
this.expressApp.use((req, res, next) => {
res.locals.message = req.flash()
next()
})but never written or used in the templates....
To stop this madness, we need a proper session-flash implementation and stop using multiple systems or structures.
No reddirest with "?flash=knhdsfapoinbgoiua", no custom made objects and template mixins.
Base Acceptance criteria:
- if the user destroys a clan or makes any mutating action, a flash message should be saved in the session
- on rendering a site, a flash-message should pop up
non-goals:
- using flash messages to show validation errors
something like
Reactions are currently unavailable