Skip to content
Snippets Groups Projects
Select Git revision
  • adb3f61c967945ea14f33dc2843b67aabd493174
  • master default
  • dockerization
  • staging
  • backup-before-cleaning-repo
  • dockerfiles-pour-maelle
6 results

README.md

Blame
  • Forked from an inaccessible project.
    notifications.js 410 B
    const warn = (req, res, title, content) => {
      req.session.user.notifications.push({ title, content, color: "warning" });
      req.session.user.save();
    };
    
    const error = (req, res, title, content) => {
      req.session.user.notifications.push({ title, content, color: "error" });
      req.session.user.save();
      return res.redirect('/'); // TODO redirect to error route or previous
    };
    
    module.exports = { warn, error };