feat: create rendu page
This commit is contained in:
parent
36fcec0970
commit
9614413e6b
@ -11,6 +11,10 @@ import boxRouter from './box.route';
|
|||||||
|
|
||||||
const routes = express.Router();
|
const routes = express.Router();
|
||||||
|
|
||||||
|
routes.get("/rendu", (_req, res) => {
|
||||||
|
res.render('rendu.ejs');
|
||||||
|
});
|
||||||
|
|
||||||
routes.use("/static", express.static(path.join(__dirname, '../static')));
|
routes.use("/static", express.static(path.join(__dirname, '../static')));
|
||||||
|
|
||||||
routes.use("/auth", authRoute);
|
routes.use("/auth", authRoute);
|
||||||
|
@ -56,7 +56,7 @@ const getAllModelsFromFans = async () => {
|
|||||||
await client.connect();
|
await client.connect();
|
||||||
|
|
||||||
const res = await client.query(
|
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();
|
await client.end();
|
||||||
|
@ -18,6 +18,12 @@
|
|||||||
Boîtes
|
Boîtes
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a href="/rendu">
|
||||||
|
<li>
|
||||||
|
Rendus
|
||||||
|
</li>
|
||||||
|
</a>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
22
back-end/src/templates/rendu.ejs
Normal file
22
back-end/src/templates/rendu.ejs
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user