private static Route redirectRoute(String toPath, Status status) { return (req, res) -> { if (status != null) { res.redirect(toPath, status.intValue()); } else { res.redirect(toPath); } return null; }; }
private static Route redirectRoute(String toPath, Status status) { return (req, res) -> { if (status != null) { res.redirect(toPath, status.intValue()); } else { res.redirect(toPath); } return null; }; }