locals.handler.js 361 B

123456789101112131415161718192021
  1. /**
  2. * @type {import("express").Handler}
  3. */
  4. function createLink(req, res, next) {
  5. res.locals.show_advanced = !!req.body.show_advanced;
  6. next();
  7. }
  8. /**
  9. * @type {import("express").Handler}
  10. */
  11. function editLink(req, res, next) {
  12. res.locals.id = req.params.id;
  13. res.locals.class = "no-animation";
  14. next();
  15. }
  16. module.exports = {
  17. createLink,
  18. editLink,
  19. }