feat: create rendu page

This commit is contained in:
Nemo D'ACREMONT 2024-11-27 15:26:09 +01:00
parent 36fcec0970
commit 9614413e6b
No known key found for this signature in database
GPG Key ID: 6E5BCE8022FA8276
4 changed files with 33 additions and 1 deletions

View File

@ -11,6 +11,10 @@ import boxRouter from './box.route';
const routes = express.Router();
routes.get("/rendu", (_req, res) => {
res.render('rendu.ejs');
});
routes.use("/static", express.static(path.join(__dirname, '../static')));
routes.use("/auth", authRoute);

View File

@ -56,7 +56,7 @@ const getAllModelsFromFans = async () => {
await client.connect();
const res = await client.query(
"SELECT id_modele FROM modeles WHERE id_membre IS NOT NULL"
"SELECT * FROM modeles WHERE id_membre IS NOT NULL"
);
await client.end();

View File

@ -18,6 +18,12 @@
Boîtes
</li>
</a>
<a href="/rendu">
<li>
Rendus
</li>
</a>
</ul>
</nav>
</header>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Liste des modeles
</title>
<%- include('partials/links.ejs') %>
</head>
<body>
<%- include('partials/header.ejs') %>
<a href="/models/fromfan"><p>Liste des modèles proposés par des fans</p></a>
<a href="javascript:let now = new Date();now.setUTCFullYear(now.getUTCFullYear() - 5);window.location.pathname = '/boxes/from/' + `${now.getUTCFullYear()}-${now.getUTCMonth() + 1}-${now.getUTCDate()}`;">
<p>Liste des boites ayant moins de 5 ans</p>
</a>
</body>
</html>