christmas/views/includes/messages.pug
2018-11-23 12:41:08 -05:00

9 lines
No EOL
364 B
Text

- successes = req.flash('success');
- errors = req.flash('error');
if successes
each success in successes
p.has-text-success= (success.toString().startsWith('[object ') ? JSON.stringify(success) : success.toString())
if errors
each error in errors
p.has-text-danger= (error.toString().startsWith('[object ') ? JSON.stringify(error) : error.toString())