You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.'}]constbuff=Buffer.from(JSON.stringify(flash))constdata=buff.toString('base64')returnres.redirect('/clans?flash='+data)
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
The text was updated successfully, but these errors were encountered:
for a pure flash implementation (a sinlge message) you can use:
awaitreq.asyncFlash('info','My Message')
this will be rendered in the default template on the next site:
#default.pug+flash-connect(connectFlash)
#mixinmixin flash-connect(connectFlash)
- var flashes =connectFlash()if flashes
ifflashes.info
div.alert(class='alert-success')
ul
each info inflashes.info
li !{info}ifflashes.error
div.alert(class='alert-danger')
ul
each error inflashes.error
li !{error}
Current status:
most of the flash messages are not working.
including some weird configurations with:
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:
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:
non-goals:
something like
The text was updated successfully, but these errors were encountered: