Skip to content
Snippets Groups Projects
Commit be2e8992 authored by Martin Lehoux's avatar Martin Lehoux
Browse files

Ajout d ela recherche par appartennance au toucan

parent ee2ec00c
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,7 @@ app.get("/clients", (req, res) => { ...@@ -73,6 +73,7 @@ app.get("/clients", (req, res) => {
.exec() .exec()
.then(clients => { .then(clients => {
if (req.query.search) clients = search(req.query.search, clients); if (req.query.search) clients = search(req.query.search, clients);
if (req.query.membre) clients = clients.filter(client => client.membre);
res.render("clients", { clients, loggedIn: Boolean(req.session.loggedIn) }) res.render("clients", { clients, loggedIn: Boolean(req.session.loggedIn) })
}) })
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment